Example #1
0
    void Start()
    {
        audioScript = FindObjectOfType <AudioScript>();
        loader      = GetComponent <LoadingBar>();

        if (GameData.currentGame.newGame) //Si no habia partida guardada
        {
            PlayButton.SetActive(false);
            newGameButton.SetActive(true);
            inputField.SetActive(false);
            InfoText.SetActive(false);
        }
        else   //si habia partida guardada.
        {
            PlayButton.SetActive(true);
            newGameButton.SetActive(false);
            inputField.SetActive(false);
            InfoText.SetActive(true);

            InfoText.GetComponentInChildren <Text>().text = "de "
                                                            + GameData.currentGame.playerName + "\n" + GameData.currentGame.lastTimeMainScene.ToString("dd/MM/yyyy");
        }
    }