Beispiel #1
0
 public void Stop()
 {
     Running             = false;
     timerWorking        = false;
     SecondsPassedForTik = 0;
     if (concoroutines != null && concoroutines.HasContext(this))
     {
         concoroutines.StopContext(this);
         if (TimerStoppedEvent != null)
         {
             TimerStoppedEvent(TimesLooped);
         }
         this.concoroutines = null;
     }
 }
Beispiel #2
0
    public void Start()
    {
        if (this.concoroutines == null)
        {
            this.concoroutines = ConfactoryFinder.Instance.Get <ConCoroutines>();
        }

        timerWorking = true;
        Running      = true;
        concoroutines.StartCoroutine(TimerLoop(), this);
        if (TimerStartedEvent != null)
        {
            TimerStartedEvent();
        }
    }