public void StopTimer() { HideTimer(); if (TimerPromise != null) { TimerPromise.Abort(); } }
new void Update() { base.Update(); if (Input.GetKeyDown(KeyCode.Space)) { sceneDelay.Abort(); FadeToScene(NextScene); } }
private void ShowText() { if (CurrentTextDisappearDelay != null) { CurrentTextDisappearDelay.Abort(); } DiffText.gameObject.SetActive(true); CurrentTextDisappearDelay = this.Delay(TextScreenTime, () => { DiffText.gameObject.SetActive(false); }); }
/// <summary> /// Stop and hide the countdown timer /// </summary> public void StopCountdown() { SecondsRemaining = 0; TimerPromise.Abort(); this.CountdownText.text = ""; }