public void Reset() { HealthClock.Start(); HitTimer.Stop(); HealTimer.Stop(); NearDeathClock.Stop(); CurrentHP = MaxHP; }
private void UpdateNearDeath() { //check if we need to change "low health" mode if (NearDeathClock.Paused && IsLowHealthMode) { NearDeathClock.Start(); } else if (!NearDeathClock.Paused && !IsLowHealthMode) { NearDeathClock.Stop(); } }
public override void Update(GameClock time) { base.Update(time); //update all timers HealthClock.Update(time); HitTimer.Update(time); HealTimer.Update(time); NearDeathClock.Update(time); UpdateNearDeath(); }