コード例 #1
0
 /**
  * This method moves the player either to chase or idle
  */
 private void CalculateMovement()
 {
     if (PlayerInLineOfSight())
     {
         model.ChasePlayer();
     }
     else
     {
         model.Timer += Time.deltaTime;
         if (model.Timer >= model.WanderTimer)
         {
             model.IdleMove();
         }
     }
 }