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

Scene to display a star system with planets and a star. More...

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

Public Member Functions

 StarSystemScene (EntityMap map, ContentManager content, StarSystem starSystem, Dictionary< string, Planet > cache, int seed)
 Initializes a new instance of the T:MidnightBlue.StarSystemScene class. More...
 
override void Initialize ()
 Ends initializing instantly. More...
 
override void HandleInput ()
 Handles moving the players ship. More...
 
override void Update ()
 Updates all systems in the game and handles the ocurrance of the player entering a planet. More...
 
override void Draw (SpriteBatch spriteBatch, SpriteBatch uiSpriteBatch)
 Draws the star system to the sprite batch and the HUD to the UI spritebatch. More...
 
void DrawMap (SpriteBatch uiSpriteBatch)
 Draws the minimap to the window. More...
 
override void Exit ()
 Exits the scene instantly. More...
 
override void Pause ()
 Pauses the scene instantly. More...
 
override void Resume ()
 Resumes the star system scene after leaving a planet. Handles resetting the physics environment, players ship settings and reactivates all planets and the star. 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

Scene to display a star system with planets and a star.

Constructor & Destructor Documentation

§ StarSystemScene()

MidnightBlue.StarSystemScene.StarSystemScene ( EntityMap  map,
ContentManager  content,
StarSystem  starSystem,
Dictionary< string, Planet cache,
int  seed 
)
inline

Initializes a new instance of the T:MidnightBlue.StarSystemScene class.

Parameters
mapEntity map to load entities into.
contentContent manager for loading resources.
starSystemStar system information to use for the scene.
cachePlanet cache used for quickly loading recently-visited star systems.
seedSeed to use in random generation.
Here is the call graph for this function:

Member Function Documentation

§ Draw()

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

Draws the star system to the sprite batch and the HUD to the UI spritebatch.

Parameters
spriteBatchSprite batch to draw world-based entities to.
uiSpriteBatchUser interface sprite batch.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

§ DrawMap()

void MidnightBlue.StarSystemScene.DrawMap ( SpriteBatch  uiSpriteBatch)
inline

Draws the minimap to the window.

Parameters
uiSpriteBatchUser interface sprite batch to draw to.
Here is the caller graph for this function:

§ Exit()

override void MidnightBlue.StarSystemScene.Exit ( )
inlinevirtual

Exits the scene instantly.

Implements MB2D.Scenes.Scene.

§ HandleInput()

override void MidnightBlue.StarSystemScene.HandleInput ( )
inlinevirtual

Handles moving the players ship.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

§ Initialize()

override void MidnightBlue.StarSystemScene.Initialize ( )
inlinevirtual

Ends initializing instantly.

Implements MB2D.Scenes.Scene.

§ Pause()

override void MidnightBlue.StarSystemScene.Pause ( )
inlinevirtual

Pauses the scene instantly.

Implements MB2D.Scenes.Scene.

§ Resume()

override void MidnightBlue.StarSystemScene.Resume ( )
inlinevirtual

Resumes the star system scene after leaving a planet. Handles resetting the physics environment, players ship settings and reactivates all planets and the star.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

§ Update()

override void MidnightBlue.StarSystemScene.Update ( )
inlinevirtual

Updates all systems in the game and handles the ocurrance of the player entering a planet.

Implements MB2D.Scenes.Scene.

Here is the call graph for this function:

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