private float TimeLimit; //!The timer limit for the timer /*!contrucstor for the timer class thiat take a time limit * \param LifeLimit this is the time limit on the timer. * When timer is started the timer will keep going until the Lifelimt is reached * or the Reset() medthod is called * \sa Reset() * */ public X8Timer(float LifeLimit) { TimeLimit = LifeLimit; //initialize how long the object will live //initialize the current time in frimas TimerOn = false; //the timer is initialy not on TimeLimitReached = null; }
private void UpdateLimit(float deltaTime) { _updateableLimit?.Update(deltaTime); Limit.text = _gameLimit.GetLimitText(); if (!LevelManager.Instance.DailyChallenge) { LimitProgress.UpdateProgressBar(_gameLimit.PercentComplete()); } if (_gameLimit.ReachedLimit()) { LimitReached?.Invoke(); } }