Exemplo n.º 1
0
    // Start is called before the first frame update
    void Start()
    {
        int Scene = Tube.GetScene();

        if (Scene == 0)
        {
            Play.onClick.AddListener(PlayOnClick);
        }
        else
        {
            timer = GameObject.Find("PC").GetComponent <Player>().timer;
            score = GameObject.Find("PC").GetComponent <Player>().score;
            Restart.onClick.AddListener(RestartOnClick);
            float timerScore = (180 / timer) * 1000;
            score       += timerScore;
            scoreOb      = GameObject.Find("Score").GetComponent <Text>();
            scoreOb.text = "" + score + ";";
        }
        Exit.onClick.AddListener(ExitOnClick);
    }