Did a bit of provider cleanup
This commit is contained in:
@ -77,6 +77,16 @@ namespace Dawn {
|
||||
return context->getGame()->timeManager.timeoutProvider.addEffect(someCallback, timeout, context);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use interval provider method. Invokes your callback at a consistant and
|
||||
* common time based on the interval you provide.
|
||||
*
|
||||
* @tparam T Your context type (usually SceneItemComponent).
|
||||
* @param someCallback Callback to be invoked.
|
||||
* @param timeout Interval to invoke your callback.
|
||||
* @param context Context of the component, just use (this).
|
||||
* @return Method that when invoked will unsubscribe from the interval.
|
||||
*/
|
||||
template<class T>
|
||||
std::function<void()> useInterval(
|
||||
std::function<void()> callback,
|
||||
|
Reference in New Issue
Block a user