Beispiel #1
0
 public Timer(EventStarter method, string externalText, int period)
 {
     this.newThread = new Thread(this.RunTimer);
     this.text = externalText;
     this.period = period;
     this.DelegateMethod = method;
     this.timer = new int();
 }
Beispiel #2
0
 public Timer(EventStarter method, string externalText, int period)
 {
     this.newThread      = new Thread(this.RunTimer);
     this.text           = externalText;
     this.period         = period;
     this.DelegateMethod = method;
     this.timer          = new int();
 }
    IEnumerator DelayedEventStart(EventStarter es)
    {
        yield return(new WaitForSeconds(es.delay));

        if (es.e.var != null)
        {
            es.e.RaiseWithVar();
        }
        else
        {
            es.e.Raise();
        }
    }