예제 #1
0
 /*
  * behaviour if does not find player
  * Guard finished the previously patrolled route
  * search for route to the end point and patrols
  */
 public IEnumerator FinishPatrol()
 {
     _detector.SeenPlayer = false;
     gameObject.layer     = 9;
     _coneRender.ActivateState(Color.grey);
     SetSpeed(PatrolSpeed);
     SetGoal(_patrolBehav.ReturnNodeInRouteAt(_patrolBehav.ReturnPatrolRouteLength() - 1));
     _routeToGoal = CalculateRouteToDestination();
     yield return(StartCoroutine(NavigateToGoal(true)));
 }