public void PauseCharacter()
 {
     isOnPause = true;
     if (charAnim != null)
     {
         charAnim.PauseCharAnim();
     }
     // TO DO
     // disable nav mesh
     //DestroyNavMeshAgent();
 }
Пример #2
0
    IEnumerator ShowFallAnim(float delayFall)
    {
        // enable rigidbody gravity
        _characterRigidbody.useGravity               = true;
        _characterRigidbody.freezeRotation           = false;
        _character.GetComponent <Collider>().enabled = false;
        _charAnim.EnableRagdoll();
        yield return(0);

        // add impulse for fun drop
        _charAnim.HitRagdoll(lastHit, dieImpulsePower);
        _charAnim.PauseCharAnim();
    }