Пример #1
0
 public void EnterState()
 {
     alertRaised = true;
     safeSpaces  = NpcBase.FindTargets <Safety>("Safety", NpcController.Location, 100f, mask, s => s.isOpen);
     if (safeSpaces.Count > 0)
     {
         safeHouse = NpcBase.TargetNearest <Safety>(NpcController.Location, safeSpaces).transform;
     }
 }
Пример #2
0
 public void EnterState()
 {
     safeSpaces = NpcBase.FindTargets <Safety>("Safety", NpcController.Location, 100f, mask, s => s.isOpen);
     if (safeSpaces.Count > 0)
     {
         safeHouse = NpcBase.TargetNearest <Safety>(NpcController.Location, safeSpaces).transform;
         if (safeHouse != null)
         {
             NpcController.mover.MoveTo(safeHouse.position);
             // bMovingToSafety = true;
         }
     }
 }
Пример #3
0
 void RunToSafety()
 {
     if (safeSpaces.Count > 0)
     {
         safeHouse = NpcBase.TargetNearest <Safety>(NpcController.Location, safeSpaces).transform;
     }
     if (safeHouse != null)
     {
         movement = (safeHouse.position - NpcController.Location).normalized;
         NpcController.Animate(movement, 1f);
         NpcController.mover.MoveTo(safeHouse.position);
         bMovingToSafety = true;
     }
 }