public void StartCountdown(int from, MyCountdownTimer.TimerFinished tf)
 {
     currentFrame = from - 1;
     sprites[currentFrame].enabled = true;
     finishedCallback = tf;
     isStarted        = true;
     timer.StartTimer(from, 1, 1, OnCountdownInterval, OnTimerFinished);
 }
Beispiel #2
0
    public void StartRound(int seconds, MyCountdownTimer.TimerElapsedCallback te, MyCountdownTimer.TimerFinished tf)
    {
        if (!isRoundStarted)
        {
            Debug.Log("start round");
            roundTime = seconds;

            finishedCallback = tf;
            intervalCallback = te;

            timeRemaining  = roundTime;
            isRoundStarted = true;

            //timeDisplay.enabled = true;//works: shows the display
            timeDisplay.SetText((timeRemaining).ToString());

            countdownTimer.StartTimer(timeRemaining, 1, 1, TimerElapsed, TimerFinished);
        }
    }
Beispiel #3
0
 public void StartFinalCountDown(int seconds, MyCountdownTimer.TimerElapsedCallback te, MyCountdownTimer.TimerFinished tf)
 {
     //timeDisplay.enabled = false;//works: hides the display
     // StartRound(seconds, te, )
 }
Beispiel #4
0
 public void StartRound(int seconds, MyCountdownTimer.TimerFinished tf)
 {
     StartRound(seconds, null, tf);
 }