Beispiel #1
0
 public TickTimer(int ticks, IntEventChannel tickChannel, bool oneOff)
 {
     _isOneOff                  = oneOff;
     _ticks                     = ticks;
     _currentTicksLeft          = ticks;
     _tickChannel               = tickChannel;
     tickChannel.OnEventRaised += CheckTick;
 }
 void Awake()
 {
     _numDays                    = 0;
     _isCounting                 = false;
     _lastCounting               = false;
     _hasLastCounting            = false;
     _tickChannel                = tickChannel;
     _tickChannel.OnEventRaised += CheckNewDay;
     _timers = new List <DayTimer>();
 }
Beispiel #3
0
 public DayTimer(int dayTicks, int days, IntEventChannel tickChannel, bool oneOff)
 {
     IsCounting                 = false;
     Started                    = false;
     _isOneOff                  = oneOff;
     _days                      = days;
     _currentDaysLeft           = _days;
     _dayTimer                  = 0;
     _ticksInDay                = dayTicks;
     _tickChannel               = tickChannel;
     tickChannel.OnEventRaised += CheckDayChanged;
 }
Beispiel #4
0
 void Awake()
 {
     _tickChannel = tickChannel;
     _tickTimers  = new List <TickTimer>();
 }