Holds the games scenes in a stack structure running the top scene every frame. Handles switching state for scenes and popping/pushing new scenes on top of one another. Allows the current scene to access other scenes.
More...
|
| SceneStack () |
| Initializes a new instance of the T:MB2D.Scenes.SceneStack class. More...
|
|
void | Push (Scene scene) |
| Pushes a new scene to the top of the stack. Calls the new scenes Initialize method and the previous scenes Pause method More...
|
|
void | Draw (SpriteBatch spriteBatch, SpriteBatch uiSpriteBatch) |
|
void | Update () |
| Updates the scene at the top of the stack and handles any state transitions if they've been called. For any transitions or scene logic to function correctly this must be called once per frame. More...
|
|
void | Pop () |
| Pops the top scene off the stack, calling its Exit method and calls the Resume method of the next scene on the stack if it exists. More...
|
|
void | ResetTo (Scene scene) |
| Resets the scene stack to the specified scene, clearing all other scenes from the stack. Use this in most scenarios instead of Push to save memory by not keeping scenes allocated if unnecessary. More...
|
|
Scene | SceneAt (int index) |
| Gets the scene located at the specific index in the stack More...
|
|
Holds the games scenes in a stack structure running the top scene every frame. Handles switching state for scenes and popping/pushing new scenes on top of one another. Allows the current scene to access other scenes.
§ SceneStack()
MB2D.Scenes.SceneStack.SceneStack |
( |
| ) |
|
|
inline |
Initializes a new instance of the T:MB2D.Scenes.SceneStack class.
§ Pop()
void MB2D.Scenes.SceneStack.Pop |
( |
| ) |
|
|
inline |
Pops the top scene off the stack, calling its Exit method and calls the Resume method of the next scene on the stack if it exists.
§ Push()
void MB2D.Scenes.SceneStack.Push |
( |
Scene |
scene | ) |
|
|
inline |
Pushes a new scene to the top of the stack. Calls the new scenes Initialize method and the previous scenes Pause method
- Parameters
-
§ ResetTo()
void MB2D.Scenes.SceneStack.ResetTo |
( |
Scene |
scene | ) |
|
|
inline |
Resets the scene stack to the specified scene, clearing all other scenes from the stack. Use this in most scenarios instead of Push to save memory by not keeping scenes allocated if unnecessary.
- Parameters
-
§ SceneAt()
Scene MB2D.Scenes.SceneStack.SceneAt |
( |
int |
index | ) |
|
|
inline |
Gets the scene located at the specific index in the stack
- Returns
- The T:MB2D.Scenes.Scene.
- Parameters
-
§ Update()
void MB2D.Scenes.SceneStack.Update |
( |
| ) |
|
|
inline |
Updates the scene at the top of the stack and handles any state transitions if they've been called. For any transitions or scene logic to function correctly this must be called once per frame.
§ Bottom
Scene MB2D.Scenes.SceneStack.Bottom |
|
get |
Gets the scene at the bottom of the stack.
The bottom scene.
§ LastIndex
int MB2D.Scenes.SceneStack.LastIndex |
|
get |
Gets the upper bounds of the indexes of the stack
The last index.
§ Size
int MB2D.Scenes.SceneStack.Size |
|
get |
Gets the current size of the stack
The size.
§ Top
Scene MB2D.Scenes.SceneStack.Top |
|
get |
Gets the scene at the top of the stack.
The scene at the top of the stack.
The documentation for this class was generated from the following file:
- MB2D/src/Scene/SceneStack.cs