// Use this for initialization
 void Start()
 {
     Application.runInBackground = true;
     timerStartValue             = (int)workTime;
     OldPoms        = PlayerPrefs.GetInt("Poms");
     TotalPoms      = SessionPoms + OldPoms;
     TimerGUIScript = this.gameObject.GetComponent <TimerGUI>();
 }
 private void Start()
 {
     if (TryGetComponent(out TimerGUI timerGuiSript))
     {
         this.timerGUI = timerGuiSript;
     }
     else
     {
         Debug.LogError("Cant find timer GUI");
     }
 }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        timerSystem   = GameObject.Find("System").transform.Find("Timer System").GetComponent <TimerSystem>();
        gradeSystem   = GameObject.Find("System").transform.Find("Grade System").GetComponent <GradeSystem>();
        patternSystem = GameObject.Find("System").transform.Find("Pattern System").GetComponent <PatternSystem>();

        milkTimer = GameObject.Find("Timer GUI").GetComponent <TimerGUI>();
        hitArea   = GameObject.Find("TimerBar").transform.Find("Hit Area").GetComponent <HitArea>();

        RestartDelay = new WaitForSeconds(1f);

        Play_Milk();
    }
Beispiel #4
0
    void Update()
    {
        float timeElapsed = TimerGUI.timeElapsed;

        guiText.text = "Time Elapsed: " + TimerGUI.timeFormat(timeElapsed);
    }