Base class to inherit from when creating different levels or scenes for a game. Automatically updates and renders Entities that are added to it.
More...
|
| Stage () |
| Constructs a new Stage. More...
|
|
| Stage (Game game) |
| Constructs a new Stage within a given Game. More...
|
|
float | GetPanValue (Vector2F pos) |
| Finds the stereo audio bias value for the given world position. More...
|
|
T | Add< T > (T item, int layer) |
| Adds an IRenderable to the Stage at a certain layer. If the item added is also an IUpdatable, it will be added to the update queue. More...
|
|
T | Add< T > (T item) |
| Adds an IUpdatable to the Stage at a certain layer. If the item added is also an IRenderable, you must use Add(item, layer) instead. More...
|
|
void | SetLayer (IRenderable renderable, int layer) |
| Sets the layer (rendering depth) of an IRenderable added to this Stage. More...
|
|
int | GetLayer (IRenderable renderable) |
| Returns the rendering layer (depth) of an IRenderable added to this Stage. More...
|
|
void | Remove (Entity ent) |
| Removes an Entity (an IRenderable, IUpdatable, or both) from this Stage. More...
|
|
void | Remove (IRenderable item) |
| Removes an IRenderable from this Stage. More...
|
|
void | Remove (IUpdatable item) |
| Removes an IUpdatable from this Stage. More...
|
|
Entity | GetEntity (params Enum[] flags) |
| Returns the first Entity added to this Stage that contains each of the specified flags. More...
|
|
TEntity | GetEntity< TEntity > (params Enum[] flags) |
| Returns the first Entity added to this Stage that is a given type and contains each of the specified flags. More...
|
|
IEnumerable< Entity > | GetEntities (params Enum[] flags) |
| Returns all Entities added to this Stage that contain each of the specified flags. More...
|
|
IEnumerable< TEntity > | GetEntities< TEntity > (params Enum[] flags) |
| Returns all Entities added to this Stage that are a given type and contain each of the specified flags. More...
|
|
IEnumerable< Entity > | GetEntities (RectF bounds, params Enum[] flags) |
| Returns all Entities added to this Stage that contain each of the specified flags and are within the specified area. More...
|
|
IEnumerable< TEntity > | GetEntities< TEntity > (RectF bounds, params Enum[] flags) |
| Returns all Entities added to this Stage that are a given type, contain each of the specified flags, and are within the specified area. More...
|
|
void | Update () |
| Updates this stage, this already gets called every tick but it can be called again if needed. More...
|
|
void | Render (Graphics graphics) |
| Renders this stage, this already gets called every tick but it can be called again if needed. More...
|
|
void | SaveState (BinaryWriter writer) |
|
void | LoadState (BinaryReader reader) |
|
IEnumerator< Entity > | GetEnumerator () |
|
|
virtual void | OnInitialize () |
| Called once, before this Stage is entered for the first time. More...
|
|
virtual void | OnEnter () |
| Called when the Game enters this Stage. Override this in game-specific Stages as needed. More...
|
|
virtual void | OnLeave () |
| Called when the Game leaves this Stage. Override this in game-specific Stages as needed. More...
|
|
override Stage | GetStage () |
| Should return the Stage containing this instance, used to find things like the time step to use for Delay awaitables. More...
|
|
virtual void | OnUpdate () |
| Override this method for game-specific Stages (be sure to call base.OnUpdate()). More...
|
|
virtual void | OnRender () |
| Override this method for game-specific Stages (be sure to call base.OnRender()). More...
|
|
virtual void | OnSaveState (BinaryWriter writer) |
|
virtual void | OnLoadState (BinaryReader reader) |
|
| CoroutineContainer () |
| Base constructor for a CoroutineContainer with an empty CoroutineCollection. More...
|
|
Awaitable | Delay (double seconds) |
| Creates a Delay Awaitable representing a pause of execution for the given duration. More...
|
|
Awaitable | While (Func< bool > predicate) |
| Creates a While Awaitable representing a pause of execution while the given predicate evaluates as true, where evaluation occurs each update. More...
|
|
Awaitable | Until (Func< bool > predicate) |
| Creates an Until Awaitable representing a pause of execution until the given predicate evaluates as true, where evaluation occurs each update. More...
|
|
Awaitable | Sequential (params Awaitable[] inner) |
| Creates a Sequential Awaitable representing a pause of execution until all elements of the given array of Awaitables have been executed in sequence. More...
|
|
Awaitable | Parallel (params Awaitable[] inner) |
| Creates a Parallel Awaitable representing a pause of execution until all elements of the given array of Awaitables have been executed concurrently. More...
|
|
Awaitable | PlayAnimation (Animation anim) |
| Creates a PlayAnimation Awaitable representing a pause of execution until the given Animation has completed. The animation will be advanced automatically. More...
|
|
Awaitable | PlayAnimation (Animation anim, Awaitable @while) |
| Creates a PlayAnimation Awaitable representing a pause of execution until either the given Animation or Awaitable has completed. The animation will be advanced automatically. Used for looping animations that would otherwise never terminate. More...
|
|
Awaitable | WaitForAnimation (Animation anim) |
| Creates a PlayAnimation Awaitable representing a pause of execution until the given Animation has completed. The animation will not be advanced automatically. More...
|
|
Awaitable | WaitForAnimation (Animation anim, Awaitable @while) |
| Creates a PlayAnimation Awaitable representing a pause of execution until either the given Animation or Awaitable has completed. The animation will not be advanced automatically. Used for looping animations that would otherwise never terminate. More...
|
|
Coroutine | StartCoroutine (params Object[] awaitables) |
| Starts a coroutine from a sequence of objects that can be converted to Awaitable instances. More...
|
|
Coroutine | StartCoroutine (IEnumerator routine) |
| Starts a coroutine from an IEnumerator that is expected to yeild Awaitable instances, null references (to delay until next the update), or other IEnumerator coroutines. When another IEnumerator is yielded the parent IEnumerator will pause execution until the child IEnumerator has finished. More...
|
|
Coroutine | StartCoroutine (Func< IEnumerator > routine) |
| Starts a coroutine from a function returning IEnumerator that is expected to yeild Awaitable instances, null references (to delay until next the update), or other IEnumerator coroutines. When another IEnumerator is yielded the parent IEnumerator will pause execution until the child IEnumerator has finished. More...
|
|
void | UpdateCoroutines () |
| Causes all active Coroutine instances attached to this CoroutineContainer to execute one step. More...
|
|
Base class to inherit from when creating different levels or scenes for a game. Automatically updates and renders Entities that are added to it.