Exemplo n.º 1
0
    // private void Awake() {
    //     SetupSingleton();
    // }

    void Start()
    {
        ui = FindObjectOfType <UIDisplay>();
        winLabel.SetActive(false);
        loseLabelOne.SetActive(false);
        loseLabelTwo.SetActive(false);
        ui.ShowScore(score);
    }
Exemplo n.º 2
0
    // void SetupSingleton(){
    //     int gameSessionCount = FindObjectsOfType<GameSession>().Length;
    //     if(gameSessionCount >1){
    //         Destroy(gameObject);
    //     }else{
    //         DontDestroyOnLoad(gameObject);
    //     }
    // }


    private void AddScore(int amount)
    {
        score += amount;
        ui.ShowScore(score);
        CheckWinCondition();
    }