コード例 #1
0
 // Use this for initialization
 void Start()
 {
     PlayerPrefs.SetInt(Last, -1);
     PlayerPrefs.SetInt(LastShade, -1);
     HUD       = GameObject.Find("HUD");
     End       = GameObject.Find("EndCanvas");
     Points    = GameObject.Find("PointsText").GetComponent <TMP_Text>();
     Timer     = GameObject.Find("TimerText").GetComponent <TMP_Text>();
     AS        = GetComponent <AudioSource>();
     OrigColor = Points.color;
     IL        = GetComponent <InputLajittelu>();
     if (!timerClockScript)
     {
         timerClockScript = FindObjectOfType <TimerClockScript>();
     }
     timerClockScript.InitializeClock(playTime);
     SetPoints();
 }
コード例 #2
0
ファイル: ConnectHUD.cs プロジェクト: KahVille/flagworld
    // Use this for initialization
    void Start()
    {
        Time.timeScale = 1;
        StartT         = GameObject.Find("RulesText").GetComponent <TMP_Text>();
        DetailsT       = GameObject.Find("Details").GetComponent <TMP_Text>();
        PointsT        = GameObject.Find("Points").GetComponent <TMP_Text>();
        TimerT         = GameObject.Find("Timer").GetComponent <TMP_Text>();
        EndP           = GameObject.Find("EndPoints").GetComponent <TMP_Text>();
        End            = GameObject.Find("End").GetComponent <Canvas>();

        SetText();
        if (!timerClockScript)
        {
            timerClockScript = FindObjectOfType <TimerClockScript>();
        }

        if (PlayerPrefs.GetInt(CurrentGameHigh) == 1) // if restart
        {
            StartCoroutine(WaitNewGame());
        }
    }