Example #1
0
        public void Init(ref Grid grid)
        {
            target = -1;
            alive = false;
            health = 100;
            pos = grid.cells[grid.indexOfExit].centre;
            safe = Rnd.r.NextDouble() > 0.5;
            progress = 0;
            prevCell = grid.indexOfExit;
            nextCell = prevCell;

            strategy = GuardStrategy.GoForMostCritical;
            pathing = GuardPathfinding.Dumb;
            targetLookAhead = false;
        }
Example #2
0
 public void SwitchStrategy()
 {
     if (strategy == GuardStrategy.GoForClosest) strategy = GuardStrategy.GoForMostCritical;
     else strategy = GuardStrategy.GoForClosest;
 }