Midnight Blue Game and Engine
Public Member Functions | Properties | List of all members
MB2D.Scenes.Scene Class Referenceabstract

Holds all logic and data for a single game screen More...

Inheritance diagram for MB2D.Scenes.Scene:
Inheritance graph
Collaboration diagram for MB2D.Scenes.Scene:
Collaboration graph

Public Member Functions

 Scene (EntityMap gameObjects, ContentManager content)
 Initializes a new instance of the T:MB2D.Scenes.Scene class with a pre-existing EntityMap More...
 
void UpdateTransition ()
 
abstract void Initialize ()
 Initialize this scene and loads all resources. Runs logic to execute during the Initializing state. Set state to None to end. More...
 
abstract void HandleInput ()
 Handles all input for the scene More...
 
abstract void Update ()
 Updates game logic and changes scene state. More...
 
abstract void Pause ()
 Runs logic to execute while the scene is in the Pausing state. Set state to None to end. More...
 
abstract void Resume ()
 Runs logic to execute while the scene is in the Resuming state. Set state to None to end. More...
 
abstract void Draw (SpriteBatch spriteBatch, SpriteBatch uiSpriteBatch)
 Draws entities and UI elements to the specfied SpriteBatches More...
 
abstract void Exit ()
 Runs logic to execute while the scene is in the Exiting state. Set state to Null to end. More...
 
void Cleanup ()
 Cleans up the scene and unloads content. More...
 

Properties

EntityMap GameObjects [get]
 Gets all entities allocated to the scene More...
 
TransitionState TransitionState [get, set]
 Gets or sets the current transition state of the scene. This causes the scene stack to change the scenes state on the next frame. More...
 
TransitionState PreviousTransitionState [get]
 Gets the state the scene was in during the last frame. More...
 
Color WindowBackgroundColor [get, set]
 Gets or sets the color of the window background for this scene. More...
 
SceneStack SceneController [get, set]
 Gets or sets the scene controller. More...
 
ContentManager Content [get]
 Gets the content manager for loading and unloading resources. More...
 
float DeltaTime [get, set]
 Gets or sets the delta time value. More...
 

Detailed Description

Holds all logic and data for a single game screen

Constructor & Destructor Documentation

§ Scene()

MB2D.Scenes.Scene.Scene ( EntityMap  gameObjects,
ContentManager  content 
)
inline

Initializes a new instance of the T:MB2D.Scenes.Scene class with a pre-existing EntityMap

Parameters
gameObjectsEntityMap to assign to the scene.
Here is the call graph for this function:

Member Function Documentation

§ Cleanup()

void MB2D.Scenes.Scene.Cleanup ( )
inline

Cleans up the scene and unloads content.

Here is the call graph for this function:

§ Draw()

abstract void MB2D.Scenes.Scene.Draw ( SpriteBatch  spriteBatch,
SpriteBatch  uiSpriteBatch 
)
pure virtual

Draws entities and UI elements to the specfied SpriteBatches

Parameters
spriteBatchWorld-coordinate based sprite batch.
uiSpriteBatchCamera-based User Interface sprite batch.

Implemented in MidnightBlue.GalaxyScene, MidnightBlue.PlanetScene, MidnightBlue.StarSystemScene, MidnightBlue.InitScene, MidnightBlue.TitleScene, MidnightBlue.MenuScene, MidnightBlue.Testing.MapTest, and MB2D.Testing.UITest.

Here is the caller graph for this function:

§ Exit()

abstract void MB2D.Scenes.Scene.Exit ( )
pure virtual

Runs logic to execute while the scene is in the Exiting state. Set state to Null to end.

Implemented in MidnightBlue.StarSystemScene, MidnightBlue.GalaxyScene, MidnightBlue.PlanetScene, MidnightBlue.InitScene, MidnightBlue.TitleScene, MidnightBlue.MenuScene, MidnightBlue.Testing.MapTest, and MB2D.Testing.UITest.

Here is the caller graph for this function:

§ HandleInput()

abstract void MB2D.Scenes.Scene.HandleInput ( )
pure virtual

§ Initialize()

abstract void MB2D.Scenes.Scene.Initialize ( )
pure virtual

Initialize this scene and loads all resources. Runs logic to execute during the Initializing state. Set state to None to end.

Implemented in MidnightBlue.StarSystemScene, MidnightBlue.GalaxyScene, MidnightBlue.PlanetScene, MidnightBlue.TitleScene, MidnightBlue.InitScene, MidnightBlue.MenuScene, MidnightBlue.Testing.MapTest, and MB2D.Testing.UITest.

Here is the caller graph for this function:

§ Pause()

abstract void MB2D.Scenes.Scene.Pause ( )
pure virtual

Runs logic to execute while the scene is in the Pausing state. Set state to None to end.

Implemented in MidnightBlue.StarSystemScene, MidnightBlue.GalaxyScene, MidnightBlue.PlanetScene, MidnightBlue.InitScene, MidnightBlue.TitleScene, MidnightBlue.MenuScene, MidnightBlue.Testing.MapTest, and MB2D.Testing.UITest.

Here is the caller graph for this function:

§ Resume()

abstract void MB2D.Scenes.Scene.Resume ( )
pure virtual

Runs logic to execute while the scene is in the Resuming state. Set state to None to end.

Implemented in MidnightBlue.StarSystemScene, MidnightBlue.GalaxyScene, MidnightBlue.PlanetScene, MidnightBlue.TitleScene, MidnightBlue.InitScene, MidnightBlue.MenuScene, MidnightBlue.Testing.MapTest, and MB2D.Testing.UITest.

Here is the caller graph for this function:

§ Update()

abstract void MB2D.Scenes.Scene.Update ( )
pure virtual

Property Documentation

§ Content

ContentManager MB2D.Scenes.Scene.Content
getprotected

Gets the content manager for loading and unloading resources.

The content manager.

§ DeltaTime

float MB2D.Scenes.Scene.DeltaTime
getset

Gets or sets the delta time value.

The delta time.

§ GameObjects

EntityMap MB2D.Scenes.Scene.GameObjects
get

Gets all entities allocated to the scene

The game objects.

§ PreviousTransitionState

TransitionState MB2D.Scenes.Scene.PreviousTransitionState
get

Gets the state the scene was in during the last frame.

The state of the previous transition.

§ SceneController

SceneStack MB2D.Scenes.Scene.SceneController
getset

Gets or sets the scene controller.

The scene controller.

§ TransitionState

TransitionState MB2D.Scenes.Scene.TransitionState
getset

Gets or sets the current transition state of the scene. This causes the scene stack to change the scenes state on the next frame.

The transition state.

§ WindowBackgroundColor

Color MB2D.Scenes.Scene.WindowBackgroundColor
getset

Gets or sets the color of the window background for this scene.

The color of the window background.


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