Ejemplo n.º 1
0
    void OnGUI()
    {
        if (startText)
        {
            GUI.backgroundColor = Color.clear;
            Time.timeScale      = 1.0F;
            if (GUI.Button(startRect, " "))
            {
                mainCam.transform.position = floorCam.transform.position;
                startText = false;
                onMenu    = false;
                LevelChange.setLevel(1);
                player.transform.position = spawn.transform.position;
                PlayerCharacter.setMaxHealth(10);
                PlayerCharacter.setHealth(10);
                PlayerCharacter.setAttack(2);
                PlayerCharacter.setDefense(0);
            }

            if (GUI.Button(exitRect, " "))
            {
                Application.Quit();
            }
        }
    }