Exemplo n.º 1
0
    public void lose()
    {
        if (!hit)
        {
            //Animation
            if (throwing)
            {
                animator.SetTrigger("loseNoTree");
            }
            else
            {
                animator.SetTrigger("lose");
            }

            cam.centerX();
            camShake.shakeDrive();

            FindObjectOfType <AudioManager>().stop("Car");
            FindObjectOfType <AudioManager>().play("Dunz");

            FindObjectOfType <TimerMain>().stop();
            StateManager.showReplay();
        }

        hit = true;
    }