C# Class Platformer.Levels.DynamicMap

A Map which holds a number of levels and can switch between them. It also holds the player instance.
Inheritance: IDisposable
Afficher le fichier Open project: zmthy/play-dead Class Usage Examples

Méthodes publiques

Méthode Description
Dispose ( ) : void

Will unload all of the loaded content.

Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void

Draws the player and the currently active level to the screen.

DynamicMap ( IServiceProvider serviceProvider, Camera2D camera, GraphicsDevice gd ) : System
GotoLevel ( int levelIndex ) : void
LoadStory ( string storyPath ) : void

Load a story and create all of the levels listed in the file by using the LevelFactory.

NextLevel ( String levelName ) : void
Update ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, Microsoft.Xna.Framework.Input.AccelerometerState accelState, DisplayOrientation orientation, InputManager inputManager ) : void

Update the Player state, the tracking camera, and the currently active level.

Method Details

Dispose() public méthode

Will unload all of the loaded content.
public Dispose ( ) : void
Résultat void

Draw() public méthode

Draws the player and the currently active level to the screen.
public Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

DynamicMap() public méthode

public DynamicMap ( IServiceProvider serviceProvider, Camera2D camera, GraphicsDevice gd ) : System
serviceProvider IServiceProvider
camera Platformer.Camera.Camera2D
gd GraphicsDevice
Résultat System

GotoLevel() public méthode

public GotoLevel ( int levelIndex ) : void
levelIndex int
Résultat void

LoadStory() public méthode

Load a story and create all of the levels listed in the file by using the LevelFactory.
public LoadStory ( string storyPath ) : void
storyPath string The filepath of the story file.
Résultat void

NextLevel() public méthode

public NextLevel ( String levelName ) : void
levelName String
Résultat void

Update() public méthode

Update the Player state, the tracking camera, and the currently active level.
public Update ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, Microsoft.Xna.Framework.Input.AccelerometerState accelState, DisplayOrientation orientation, InputManager inputManager ) : void
gameTime Microsoft.Xna.Framework.GameTime The current time step of the game.
keyboardState Microsoft.Xna.Framework.Input.KeyboardState The current state of the PC keyboard.
gamePadState Microsoft.Xna.Framework.Input.GamePadState
touchState TouchCollection
accelState Microsoft.Xna.Framework.Input.AccelerometerState
orientation DisplayOrientation
inputManager InputManager
Résultat void