C# Class CastleEscape.StateManager

Manages the game states. Author: Dennis Honeyman
显示文件 Open project: Daminvar/CastleEscape

Public Methods

Method Description
Draw ( SpriteBatch spriteBatch ) : void

Draws the top state.

Initialize ( ) : void

Initialize the state manager

IsEmpty ( ) : bool
PopAllStates ( ) : void

Removes all states.

PopState ( ) : void

Removes the top state.

PushState ( State newState ) : void

Adds a new state.

Update ( GameTime gameTime ) : void

Updates the top state. Called every frame.

Private Methods

Method Description
drawState ( SpriteBatch spriteBatch, int index ) : void

Method Details

Draw() public static method

Draws the top state.
public static Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch The SpriteBatch object to use for drawing.
return void

Initialize() public static method

Initialize the state manager
public static Initialize ( ) : void
return void

IsEmpty() public static method

public static IsEmpty ( ) : bool
return bool

PopAllStates() public static method

Removes all states.
public static PopAllStates ( ) : void
return void

PopState() public static method

Removes the top state.
public static PopState ( ) : void
return void

PushState() public static method

Adds a new state.
public static PushState ( State newState ) : void
newState State
return void

Update() public static method

Updates the top state. Called every frame.
public static Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void