Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Static Public Member Functions | List of all members
CallbackUtil Class Reference

Static Public Member Functions

static void Clear (this Callback cb)
 Sets the callback to a non-null empty method, removing any assigned callbacks More...
 
static void Clear< T > (this Callback< T > cb)
 Sets the callback to a non-null empty method, removing any assigned callbacks More...
 
static void Clear< T, U > (this Callback< T, U > cb)
 Sets the callback to a non-null empty method, removing any assigned callbacks More...
 
static void Clear< T, U, V > (this Callback< T, U, V > cb)
 Sets the callback to a non-null empty method, removing any assigned callbacks More...
 
static IEnumerator DelayedCallback (float timeToWait, Callback cb)
 
static IEnumerator DelayedCallback (int framesToWait, Callback cb)
 
static IEnumerator DelayedCallback (IEnumerable yieldObj, Callback cb)
 
static IEnumerator DelayedCallback< T > (float timeToWait, Callback< T > cb, T arg)
 
static IEnumerator DelayedCallback< T > (int framesToWait, Callback< T > cb, T arg)
 
static IEnumerator DelayedCallback< T > (IEnumerable yieldObj, Callback< T > cb, T arg)
 
static IEnumerator DelayedCallback< T, U > (float timeToWait, Callback< T, U > cb, T arg1, U arg2)
 
static IEnumerator DelayedCallback< T, U > (int framesToWait, Callback< T, U > cb, T arg1, U arg2)
 
static IEnumerator DelayedCallback< T, U > (IEnumerable yieldObj, Callback< T, U > cb, T arg1, U arg2)
 
static IEnumerator DelayedCallback< T, U, V > (float timeToWait, Callback< T, U, V > cb, T arg1, U arg2, V arg3)
 
static IEnumerator DelayedCallback< T, U, V > (int framesToWait, Callback< T, U, V > cb, T arg1, U arg2, V arg3)
 
static IEnumerator DelayedCallback< T, U, V > (IEnumerable yieldObj, Callback< T, U, V > cb, T arg1, U arg2, V arg3)
 
static IEnumerator DoUntil (Callback cb, System.Func< bool > condition)
 
static IEnumerator HoldUntil (System.Func< bool > condition)
 yield returns null until the given condition passes. Similar to DoUntil but takes no action afterwards. More...
 
static void LazyCallback (Callback cb, MonoBehaviour coroutineHost, int framedelay)
 LazyCallbacks run on a delayed coroutine where any calls to the same method (from the same host) will delay it further. Similar to KSP release schedules, 'anytime someone asks, it gets pushed further' More...
 
static IEnumerator WaitUntil (System.Func< bool > condition, Callback cb)
 

Member Function Documentation

static void CallbackUtil.Clear ( this Callback  cb)
inlinestatic

Sets the callback to a non-null empty method, removing any assigned callbacks

Parameters
cb
static void CallbackUtil.Clear< T > ( this Callback< T >  cb)
inlinestatic

Sets the callback to a non-null empty method, removing any assigned callbacks

Parameters
cb
static void CallbackUtil.Clear< T, U > ( this Callback< T, U >  cb)
inlinestatic

Sets the callback to a non-null empty method, removing any assigned callbacks

Parameters
cb
static void CallbackUtil.Clear< T, U, V > ( this Callback< T, U, V >  cb)
inlinestatic

Sets the callback to a non-null empty method, removing any assigned callbacks

Parameters
cb
static IEnumerator CallbackUtil.DelayedCallback ( float  timeToWait,
Callback  cb 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback ( int  framesToWait,
Callback  cb 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback ( IEnumerable  yieldObj,
Callback  cb 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T > ( float  timeToWait,
Callback< T >  cb,
arg 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T > ( int  framesToWait,
Callback< T >  cb,
arg 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T > ( IEnumerable  yieldObj,
Callback< T >  cb,
arg 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T, U > ( float  timeToWait,
Callback< T, U >  cb,
arg1,
arg2 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T, U > ( int  framesToWait,
Callback< T, U >  cb,
arg1,
arg2 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T, U > ( IEnumerable  yieldObj,
Callback< T, U >  cb,
arg1,
arg2 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T, U, V > ( float  timeToWait,
Callback< T, U, V >  cb,
arg1,
arg2,
arg3 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T, U, V > ( int  framesToWait,
Callback< T, U, V >  cb,
arg1,
arg2,
arg3 
)
inlinestatic
static IEnumerator CallbackUtil.DelayedCallback< T, U, V > ( IEnumerable  yieldObj,
Callback< T, U, V >  cb,
arg1,
arg2,
arg3 
)
inlinestatic
static IEnumerator CallbackUtil.DoUntil ( Callback  cb,
System.Func< bool >  condition 
)
inlinestatic
static IEnumerator CallbackUtil.HoldUntil ( System.Func< bool >  condition)
inlinestatic

yield returns null until the given condition passes. Similar to DoUntil but takes no action afterwards.

static void CallbackUtil.LazyCallback ( Callback  cb,
MonoBehaviour  coroutineHost,
int  framedelay 
)
inlinestatic

LazyCallbacks run on a delayed coroutine where any calls to the same method (from the same host) will delay it further. Similar to KSP release schedules, 'anytime someone asks, it gets pushed further'

Parameters
cbthe callback to run. Avoid lambdas here to ensure the cb references match (also to prevent probable mem leaks)
coroutineHostthe monobehaviour hosting the coroutine. Use a global singleton (like highlogic) if delaying across multiple components is desired.
framedelayThe number of frames to wait before calling. In case different values are given, the longest delay wins out.
static IEnumerator CallbackUtil.WaitUntil ( System.Func< bool >  condition,
Callback  cb 
)
inlinestatic

The documentation for this class was generated from the following file: