C# Класс Platformer.Levels.DynamicMap

A Map which holds a number of levels and can switch between them. It also holds the player instance.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

Dispose() публичный Метод

Will unload all of the loaded content.
public Dispose ( ) : void
Результат void

Draw() публичный Метод

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
Результат void

DynamicMap() публичный Метод

public DynamicMap ( IServiceProvider serviceProvider, Camera2D camera, GraphicsDevice gd ) : System
serviceProvider IServiceProvider
camera Platformer.Camera.Camera2D
gd GraphicsDevice
Результат System

GotoLevel() публичный Метод

public GotoLevel ( int levelIndex ) : void
levelIndex int
Результат void

LoadStory() публичный Метод

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.
Результат void

NextLevel() публичный Метод

public NextLevel ( String levelName ) : void
levelName String
Результат void

Update() публичный Метод

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
Результат void