Into Game Mechanics: Guards Patrol — Part 2
Published in
3 min readSep 24, 2021
--
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.