Ejemplo n.º 1
0
    //Death method
    public void Death()
    {
        GetComponent <Animation>().CrossFade(death.animation.name);
        GetComponent <Animation>()[death.animation.name].speed = death.speedAnimation;

        if (GetComponent <Animation>()[death.animation.name].normalizedTime > 0.9f)
        {
            heroController.DeadReset();
        }
    }