Arcade
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
GameAPI.BudgetBoy.Awaitable Class Referenceabstract

Base class for objects representing tasks that are performed over several frames, mainly used within coroutines to pause control flow until the corresponding task is complete. More...

Inheritance diagram for GameAPI.BudgetBoy.Awaitable:
GameAPI.BudgetBoy.Delay GameAPI.BudgetBoy.Parallel GameAPI.BudgetBoy.PlayAnimation GameAPI.BudgetBoy.Sequential GameAPI.BudgetBoy.Until GameAPI.BudgetBoy.While

Public Member Functions

void Update ()
 Update the task represented by this Awaitable for one frame. More...
 

Static Public Member Functions

static Awaitable FromObject (Object obj)
 Attempts to convert an object into an Awaitable. If the object is an IEnumerator or a function returning an IEnumerator it is converted into a Coroutine, otherwise it is assumed to extend Awaitable. Returns null if the object cannot be converted. More...
 

Protected Member Functions

virtual void OnStarted ()
 Called when the Awaitable first begins updating its task. More...
 
abstract void OnUpdate ()
 Called when the task represented by this Awaitable should update for one frame. More...
 
virtual void OnCompleted ()
 Called when the Awaitable has completed its task. More...
 

Properties

abstract bool IsComplete [get]
 When overridden, returns true if the Awaitable's task has completed. More...
 

Events

EventHandler< AwaitableEventArgsStarted
 Event called when the Awaitable first begins updating its task. More...
 
EventHandler< AwaitableEventArgsCompleted
 Event called when the Awaitable has completed its task. More...
 

Detailed Description

Base class for objects representing tasks that are performed over several frames, mainly used within coroutines to pause control flow until the corresponding task is complete.

Member Function Documentation

static Awaitable GameAPI.BudgetBoy.Awaitable.FromObject ( Object  obj)
inlinestatic

Attempts to convert an object into an Awaitable. If the object is an IEnumerator or a function returning an IEnumerator it is converted into a Coroutine, otherwise it is assumed to extend Awaitable. Returns null if the object cannot be converted.

Parameters
objObject to convert.
Returns
An Awaitable corresponding to obj or null if the conversion failed.
virtual void GameAPI.BudgetBoy.Awaitable.OnCompleted ( )
inlineprotectedvirtual

Called when the Awaitable has completed its task.

virtual void GameAPI.BudgetBoy.Awaitable.OnStarted ( )
inlineprotectedvirtual

Called when the Awaitable first begins updating its task.

abstract void GameAPI.BudgetBoy.Awaitable.OnUpdate ( )
protectedpure virtual
void GameAPI.BudgetBoy.Awaitable.Update ( )
inline

Update the task represented by this Awaitable for one frame.

Property Documentation

abstract bool GameAPI.BudgetBoy.Awaitable.IsComplete
get

When overridden, returns true if the Awaitable's task has completed.

Event Documentation

EventHandler<AwaitableEventArgs> GameAPI.BudgetBoy.Awaitable.Completed

Event called when the Awaitable has completed its task.

EventHandler<AwaitableEventArgs> GameAPI.BudgetBoy.Awaitable.Started

Event called when the Awaitable first begins updating its task.