Example #1
0
 // Constructor
 // Only need to set minutes and seconds if timerType is Countdown
 public C_Timer(E_TimerType timerType = E_TimerType.Stopwatch, float minutes = 0, float seconds = 0)
 {
     this.timerType = timerType;
     this.minutes = minutes;
     this.seconds = seconds;
     _minutes_resetValue = minutes;
     _seconds_resetValue = seconds;
 }
Example #2
0
        public Timeline( string name, bool startActive, float startTime, float effectTime, E_TimerType timerType, E_RestType restType )
        {
            Name = name;
            Active = startActive;

            Time = 0.0f;
            StartTime = startTime;
            EffectTime = effectTime;

            TimerType = timerType;
            TimerDirection = ( startActive ? E_TimerDirection.Increase : E_TimerDirection.None );
            RestType = restType;

            Effects = new List< TimelineEffect >();
        }
Example #3
0
 // Resets the Timer
 // hardReset is to reinitialise everything
 // !hardReset is to just reset the updating variables ( in this case, the minutes and seconds )
 public void Reset(bool hardReset = false, E_TimerType timerType = E_TimerType.Stopwatch, float minutes = 0, float seconds = 0)
 {
     if (hardReset) {
         this.timerType = timerType;
         this.minutes = minutes;
         this.seconds = seconds;
         _minutes_resetValue = minutes;
         _seconds_resetValue = seconds;
     }
     else
     {
         this.minutes = _minutes_resetValue;
         this.seconds = _seconds_resetValue;
     }
 }
Example #4
0
        public Timeline(string name, bool startActive, float startTime, float effectTime, E_TimerType timerType, E_RestType restType)
        {
            Name   = name;
            Active = startActive;

            Time       = 0.0f;
            StartTime  = startTime;
            EffectTime = effectTime;

            TimerType      = timerType;
            TimerDirection = (startActive ? E_TimerDirection.Increase : E_TimerDirection.None);
            RestType       = restType;

            Effects = new List <TimelineEffect>();
        }