Ejemplo n.º 1
0
    private void Die()
    {
        death.GameOverUI();
        for (int i = 2; i < objectsToDisable.Length - 1; i++)
        {
            objectsToDisable[i].gameObject.SetActive(false);
        }

        cam.GetComponent <MouseLook>().enabled = false;

        foreach (Behaviour item in behavioursToDisable)
        {
            if (item != GetComponent(typeof(Teleport)))
            {
                item.enabled = false;
            }
        }
        gameObject.GetComponent <CharacterController>().enabled = false;
    }