static public IYieldInstruction WaitUntil <T>(this object target, Signal <T> signal, float fTimeOut = float.PositiveInfinity) { _WaitSignal <T> pWaiter = new _WaitSignal <T>(); pWaiter.SetParams(signal, fTimeOut, null); return(pWaiter); }
/// Garbage free static public IYieldInstruction WaitUntil(this object target, Signal signal, float fTimeOut = float.PositiveInfinity) { _WaitSignal pWaiter = CoroutineMgr._Instance._waitSignalPool.Get(); pWaiter.SetParams(signal, fTimeOut, null); return(pWaiter); }
static public IYieldInstruction DoUpdateUntil <T>(this object target, Action updateHandler, Signal <T> signal, float fTimeOut = float.PositiveInfinity) { _WaitSignal <T> pWaiter = new _WaitSignal <T>(); pWaiter.SetParams(signal, fTimeOut, updateHandler); return(pWaiter); }
internal void _FreeSignalWaiter(_WaitSignal pWaiter) { Debugger.Assert(pWaiter.GetRef() == 0); _waitSignalPool.Free(pWaiter); }