Example #1
0
 private void CheckForFalling()
 {
     if (Alive && (_charController.velocity.y < _fallingSpeedThreshold))
     {
         Alive = false;
         _glc.NotifyPlayerDeath();
     }
 }
 private void CheckPlayerKill()
 {
     // Check if persecutor is in killing range of player character
     if (Vector3.Distance(playerCharacter.transform.position, agent.transform.position) <= killDistance)
     {
         _glc.NotifyPlayerDeath();
         StopHaunting();
         // ANIMATION TRIGGER IN ANIMATOR
     }
 }