示例#1
0
 void Update()
 {
     velocity = agent.velocity.magnitude;
     if (LocationManager.instance && LocationManager.instance.PlayerIsSafe())
     {
         agent.isStopped         = true;
         myRigidbody.constraints = RigidbodyConstraints.FreezeAll;
         animationController.Idle();
         chasing = Chasing.NOTHING;
         return;
     }
     AdjustSpeed();
     PlayFootsteps();
     ChaseIfLightOn();
     StopAtGoal();
     KeepUpWithPlayer();
     ChaseIfLookingDownAndClose();
 }