Beispiel #1
0
        public void SaveTimeSlots(IEnumerable <PowerTimeSlot> timeSlotsToSave)
        {
            _timer.DisableTimer();

            _timeSlotStore.SaveTimeSlots(timeSlotsToSave);
            CheckTimeSlots();

            _timer.EnableTimer();
        }
Beispiel #2
0
        private void InitTimer()
        {
            timer = new DownTimer(delayBetweenDamage);

            ((DownTimer)timer).OnTimerEnd += () =>
            {
                // TODO: change to use Element.Empty once implemented
                damageable.TakeDamage(damagePerTick, null, gameObject);
                timer.Reset();
            };

            timer.EnableTimer();
        }
Beispiel #3
0
 public void Remove(float seconds)
 {
     ((DownTimer)timer).SetNewTime(seconds);
     timer.EnableTimer();
 }
Beispiel #4
0
 private void OnEnable()
 {
     timer.Reset();
     timer.EnableTimer();
 }