/// <summary> /// Updates alarm. Returns true, if alarm is being triggered. /// </summary> public new virtual bool Update() { if (Enabled && Counter > 0) { Counter -= TimeKeeper.Time(); if (Counter <= 0) { TriggerEvent?.Invoke(this); return(true); } } return(false); }
public Alarm(TimeKeeper timeKeeper) : base(timeKeeper) { }
public Alarm(TimeKeeper timeKeeper, Action <Alarm> triggerAction) : base(timeKeeper) =>
public AutoAlarm(double time, TimeKeeper timeKeeper, Action <Alarm> triggerAction) : base(timeKeeper, triggerAction) { Time = time; Set(Time); }
public AutoAlarm(double time, TimeKeeper timeKeeper) : base(timeKeeper) { Time = time; Set(Time); }