// Update is called once per frame void Update() { if (PauseManager.IsPaused()) { return; } if (DynamicGameManager.IsGameOver()) { return; } timeLeft -= Time.deltaTime; if (timeLeft < currentCD) { countdown.Invoke(); currentCD--; } if (timeLeft < 0) { timerOff.Invoke(); if (timeBar != null) { timeBar.Set(0f); } } else if (timeBar != null) { timeBar.Set(timeLeft / maxTime); } }
// Use this for initialization void Start() { Timer t = DynamicGameManager.getTimer(); t.SubscribeCountdown(playEfx); source = GetComponent <AudioSource>(); }
void Awake() { if (instance == null) { instance = this; } timer = GetComponent <Timer>(); gameOver = new UnityEvent(); }
// Use this for initialization void Start() { DynamicGameManager.UpisiSe(this.gameObject); }
// Update is called once per frame void OnDestroy() { DynamicGameManager.IspisiSe(this.gameObject); }
// Use this for initialization void Start() { transform.gameObject.SetActive(false); DynamicGameManager.Subscribe(Show); }
void Update() { text.text = DynamicGameManager.Score().ToString(); }