Midnight Blue Game and Engine
Public Member Functions | List of all members
MidnightBlue.GalaxyScene Class Reference

The scene displayed at the galaxy view - handles the control over all systems, loading, and content management for the scene. More...

Inheritance diagram for MidnightBlue.GalaxyScene:
Inheritance graph
Collaboration diagram for MidnightBlue.GalaxyScene:
Collaboration graph

Public Member Functions

 GalaxyScene (EntityMap map, ContentManager content)
 Initializes a new instance of the T:MB2D.GalaxyScene class. Loads all resources and sets up the galaxy for generation. More...
 
override void Initialize ()
 Initializes the galaxy generation and background music - sets up the players ship and the collision bounds. More...
 
override void HandleInput ()
 Handles all input for the player ship and moves between galaxy and star system scenes if the player enters a star system. More...
 
override void Update ()
 Updates the galaxy view and fuel consumption if not loading. More...
 
override void Draw (SpriteBatch spriteBatch, SpriteBatch uiSpriteBatch)
 Draw the game world and UI to the specified spriteBatch and uiSpriteBatch. More...
 
override void Exit ()
 Exit this scene instantly. More...
 
override void Pause ()
 Fades the sound out when transitioning to another scene unless the next scene is the star system scene. More...
 
override void Resume ()
 Resets the physics environment when returning to the scene and rebuilds the galaxy from its cache. More...
 
- Public Member Functions inherited from MB2D.Scenes.Scene
 Scene (EntityMap gameObjects, ContentManager content)
 Initializes a new instance of the T:MB2D.Scenes.Scene class with a pre-existing EntityMap More...
 
void UpdateTransition ()
 
void Cleanup ()
 Cleans up the scene and unloads content. More...
 

Additional Inherited Members

- Properties inherited from MB2D.Scenes.Scene
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

The scene displayed at the galaxy view - handles the control over all systems, loading, and content management for the scene.

Constructor & Destructor Documentation

§ GalaxyScene()

MidnightBlue.GalaxyScene.GalaxyScene ( EntityMap  map,
ContentManager  content 
)
inline

Initializes a new instance of the T:MB2D.GalaxyScene class. Loads all resources and sets up the galaxy for generation.

Parameters
mapGame objects to use.
contentContent manager to use.

Member Function Documentation

§ Draw()

override void MidnightBlue.GalaxyScene.Draw ( SpriteBatch  spriteBatch,
SpriteBatch  uiSpriteBatch 
)
inlinevirtual

Draw the game world and UI to the specified spriteBatch and uiSpriteBatch.

Parameters
spriteBatchSprite batch for world-based entities.
uiSpriteBatchUser interface sprite batch.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

§ Exit()

override void MidnightBlue.GalaxyScene.Exit ( )
inlinevirtual

Exit this scene instantly.

Implements MB2D.Scenes.Scene.

§ HandleInput()

override void MidnightBlue.GalaxyScene.HandleInput ( )
inlinevirtual

Handles all input for the player ship and moves between galaxy and star system scenes if the player enters a star system.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

§ Initialize()

override void MidnightBlue.GalaxyScene.Initialize ( )
inlinevirtual

Initializes the galaxy generation and background music - sets up the players ship and the collision bounds.

Implements MB2D.Scenes.Scene.

§ Pause()

override void MidnightBlue.GalaxyScene.Pause ( )
inlinevirtual

Fades the sound out when transitioning to another scene unless the next scene is the star system scene.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

§ Resume()

override void MidnightBlue.GalaxyScene.Resume ( )
inlinevirtual

Resets the physics environment when returning to the scene and rebuilds the galaxy from its cache.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

§ Update()

override void MidnightBlue.GalaxyScene.Update ( )
inlinevirtual

Updates the galaxy view and fuel consumption if not loading.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

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