Exemplo n.º 1
0
    void Start()
    {
        returnButton = returnButton.GetComponent <Button>();
        scoreText    = GameObject.Find("ScoreText").GetComponent <Text>();
        timerText    = GameObject.Find("TimerText").GetComponent <Text>();

        if (GameObject.Find("GameManager"))
        {
            manager = GameObject.Find("GameManager").GetComponent <GameManagerScript>();
            SetScoreText();
        }
        if (GameObject.Find("TimeAttackSession(Clone)"))
        {
            timeAttackSession       = GameObject.Find("TimeAttackSession(Clone)");
            timeAttackSessionScript = GameObject.Find("TimeAttackSession(Clone)").GetComponent <TimeAttackSessionScript>();
            SetTimerText();
            Destroy(timeAttackSession);
        }
    }
Exemplo n.º 2
0
    void Start()
    {
        returnButton = returnButton.GetComponent<Button>();
        scoreText = GameObject.Find("ScoreText").GetComponent<Text>();
        timerText = GameObject.Find("TimerText").GetComponent<Text>();

        if (GameObject.Find("GameManager"))
        {
            manager = GameObject.Find("GameManager").GetComponent<GameManagerScript>();
            SetScoreText();
        }
        if (GameObject.Find("TimeAttackSession(Clone)"))
        {
            timeAttackSession = GameObject.Find("TimeAttackSession(Clone)");
            timeAttackSessionScript = GameObject.Find("TimeAttackSession(Clone)").GetComponent<TimeAttackSessionScript>();
            SetTimerText();
            Destroy(timeAttackSession);
        }
    }