Geek Culture
Published in

Geek Culture

Into Game Mechanics: Guards Patrol — Part 2

Objective: Optimize patrol, introduce random patrol, introduce guard animations

Today we’re going to make thing better for the guards. First thing is to optimize their behaviour. I thought about it and leaving all in update methods results in useless calculations and vector comparisons. So, I’m going to shove everything in a coroutine and start it in the .Start() method.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Daniele Quero, PhD

Daniele Quero, PhD

A professional developer with passion for game developing and skill-growing. A former Nuclear Physics Researcher who changed his life to pursue his dreams