private static FTweenTool CreateFTween(FTweenEvent data, Component mo) { var d = TimerController.SetTimer(data); d.SetBody(mo); return(d.mControl); }
public T RegTimer <T>(T timer) where T : TimerEvent { var logic = TimerController.SetTimer(timer); mTimerEvent[logic.handle] = logic; return(logic); }
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(); } } }
public static Timer_Frequency SetTimerEx(TimerFun fun, int fre, Component mo = null) { return(TimerController.SetTimer(new Timer_Frequency(fre, fun, mo))); }
public static Timer_Logic SetTimer(TimerCall fun, float waitTime, Component mo) { return(TimerController.SetTimer(new Timer_Logic(fun, waitTime, mo))); }
public static Timer_CYield SetTimer(IEnumerator tor, TimerCall FinishedEvent = null, Component mo = null) { return(TimerController.SetTimer(new Timer_CYield(tor, FinishedEvent, mo))); }