Пример #1
0
    IEnumerator AddTimerCoroutine <T>(float timesec, TimeoutEventDelegate cb, params object[] arr)
    {
        yield return(0);

        if (!_CallbackDic.ContainsKey(typeof(T)))
        {
            _CallbackDic.Add(typeof(T), new Timer(timesec, cb, arr));
        }
    }
Пример #2
0
 public void AddTimer <T>(float timesec, TimeoutEventDelegate cb, params object[] arr)
 {
     StartCoroutine(AddTimerCoroutine <T>(timesec, cb, arr));
 }
Пример #3
0
 public Timer(float timesec, TimeoutEventDelegate cb, params object[] arr)
 {
     _Params      = arr;
     _Callback    = cb;
     _TimerEntity = new CrudeElapsedTimer(timesec);
 }