Exemple #1
0
 protected void Patrol()
 {
     moveTarget     = patrolPath.Patrol();
     enemyMovement += MoveTowardTarget;
     if (FindPlayerVisible() || AnyPlayerWithinRange(detectionRange))
     {
         if (IsFound())
         {
             patrolPath.StopPatrol();
             enemiesSituation.IncreaseAlertedEnemies();
             stateAction = ChasePlayer;
         }
     }
     else
     {
         timeSpotted = 0;
     }
 }