Example #1
0
        private static FTweenTool CreateFTween(FTweenEvent data, Component mo)
        {
            var d = TimerController.SetTimer(data);

            d.SetBody(mo);
            return(d.mControl);
        }
Example #2
0
        public T RegTimer <T>(T timer) where T : TimerEvent
        {
            var logic = TimerController.SetTimer(timer);

            mTimerEvent[logic.handle] = logic;
            return(logic);
        }
Example #3
0
 private void ThreadRec(object time)
 {
     while (IsValid())
     {
         float nextTime = mThreadCallBack(this, mResult);
         if (mResult.callBack != null)
         {
             var call  = mResult.callBack;
             var value = mResult.value;
             if (call != null)
             {
                 TimerController.SetTimer <Timer_Frequency>(new Timer_Frequency((f) =>
                 {
                     call(this, value);
                 }, 0, stBody, "Thread"));
             }
         }
         mResult.Reset();
         if (nextTime < 0)
         {
             StopTimer();
         }
     }
 }
Example #4
0
 public static Timer_Frequency SetTimerEx(TimerFun fun, int fre, Component mo = null)
 {
     return(TimerController.SetTimer(new Timer_Frequency(fre, fun, mo)));
 }
Example #5
0
 public static Timer_Logic SetTimer(TimerCall fun, float waitTime, Component mo)
 {
     return(TimerController.SetTimer(new Timer_Logic(fun, waitTime, mo)));
 }
Example #6
0
 public static Timer_CYield SetTimer(IEnumerator tor, TimerCall FinishedEvent = null, Component mo = null)
 {
     return(TimerController.SetTimer(new Timer_CYield(tor, FinishedEvent, mo)));
 }