Exemplo n.º 1
0
    void Start()
    {
        gm        = GameObject.FindGameObjectWithTag("GameController").GetComponent <DataPersistance>();
        mat.color = new Color(1.0f, 1.0f, 1.0f);

        if (gm.firstTimeLoading == false)
        {
            health = gm.getPlayerHealth();
        }
        else
        {
            health = 3;
            gm.setPlayerScore(0);
            gm.firstTimeLoading = false;
        }

        gm.setPlayerHealth(health);

        gameOver  = gameObject.GetComponent <SceneController>();
        uiManager = UI.GetComponent <UI_Manager>();
        PlayerPrefs.SetInt("HighScore", 0);
    }