C# Class PrinceGame.RoomNew

Afficher le fichier Open project: salvadorc17/Prince-Monogame Class Usage Examples

Méthodes publiques

Свойство Type Description
BOTTOM_LIMIT int
ExitTile Exit
elements List
heightInLevel int
map Map
maze Maze
roomIndex int
roomName string
roomStart bool
roomType int
roomX int
roomY int
roomZ int
tilesTemporaney System.Collections.ArrayList
widthInLevel int

Méthodes publiques

Méthode Description
Dispose ( ) : void

Unloads the level content.

Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void

Draw everything in the level from background to foreground.

DrawMask ( GameTime gameTime, SpriteBatch spriteBatch ) : void

Draw everything in the level from background to foreground.

DrawSprites ( GameTime gameTime, SpriteBatch spriteBatch ) : void
GetBounds ( int x, int y ) : Rectangle

Gets the bounding rectangle of a Tile in world space.

GetCollision ( int x, int y ) : Enumeration.TileCollision

Gets the collision mode of the Tile at a particular location. This method handles tiles outside of the levels boundries by making it impossible to escape past the left or right edges, but allowing things to jump beyond the top of the level and fall off the bottom.

GetExit ( int x, int y ) : Exit
GetTile ( Vector2 playerPosition ) : Tile
GetTile ( int x, int y ) : Tile
GetTiles ( Enumeration tileType ) : List
GetType ( int x, int y ) : Enumeration.TileType
LooseShake ( ) : void
RoomNew ( Maze maze, string filePath, int roomIndex, int roomType ) : System
SpritesInRoom ( ) : List
StartNewLife ( GraphicsDevice graphicsDevice ) : void

Restores the player to the starting point to try the level again.

SubsTile ( Vector2 coordinate, Enumeration tileType ) : void
SubsTileState ( Vector2 position, Enumeration state ) : void
Update ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
getBoundTiles ( Rectangle playerBounds ) : Vector4
getCenterTile ( Rectangle playerBounds ) : Vector2

Private Methods

Méthode Description
DrawTilesBlocks ( GameTime gametime, SpriteBatch spriteBatch ) : void
DrawTilesBlocks2 ( GameTime gametime, SpriteBatch spriteBatch ) : void
DrawTilesDown ( GameTime gametime, SpriteBatch spriteBatch ) : void
DrawTilesInverseNew ( GameTime gametime, SpriteBatch spriteBatch ) : void
DrawTilesLeft ( GameTime gametime, SpriteBatch spriteBatch ) : void
DrawTilesMask ( GameTime gametime, SpriteBatch spriteBatch ) : void
DrawTilesUp ( GameTime gametime, SpriteBatch spriteBatch ) : void
LoadTile ( Enumeration tiletype ) : Tile

Creates a new Tile. The other Tile loading methods typically chain to this method after performing their special logic.

LoadTile ( Enumeration tiletype, Enumeration state, int switchButton, Enumeration item, Enumeration nextTileType, float timeOpen ) : Tile
LoadTiles ( ) : void
UpdateItems ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
UpdateSprites ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
UpdateTiles ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
UpdateTilesLeft ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
UpdateTilesTemporaney ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
UpdateTilesUp ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void

Method Details

Dispose() public méthode

Unloads the level content.
public Dispose ( ) : void
Résultat void

Draw() public méthode

Draw everything in the level from background to foreground.
public Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

DrawMask() public méthode

Draw everything in the level from background to foreground.
public DrawMask ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

DrawSprites() public méthode

public DrawSprites ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Résultat void

GetBounds() public méthode

Gets the bounding rectangle of a Tile in world space.
public GetBounds ( int x, int y ) : Rectangle
x int
y int
Résultat Microsoft.Xna.Framework.Rectangle

GetCollision() public méthode

Gets the collision mode of the Tile at a particular location. This method handles tiles outside of the levels boundries by making it impossible to escape past the left or right edges, but allowing things to jump beyond the top of the level and fall off the bottom.
public GetCollision ( int x, int y ) : Enumeration.TileCollision
x int
y int
Résultat Enumeration.TileCollision

GetExit() public méthode

public GetExit ( int x, int y ) : Exit
x int
y int
Résultat Exit

GetTile() public méthode

public GetTile ( Vector2 playerPosition ) : Tile
playerPosition Vector2
Résultat Tile

GetTile() public méthode

public GetTile ( int x, int y ) : Tile
x int
y int
Résultat Tile

GetTiles() public méthode

public GetTiles ( Enumeration tileType ) : List
tileType Enumeration
Résultat List

GetType() public méthode

public GetType ( int x, int y ) : Enumeration.TileType
x int
y int
Résultat Enumeration.TileType

LooseShake() public méthode

public LooseShake ( ) : void
Résultat void

RoomNew() public méthode

public RoomNew ( Maze maze, string filePath, int roomIndex, int roomType ) : System
maze Maze
filePath string
roomIndex int
roomType int
Résultat System

SpritesInRoom() public méthode

public SpritesInRoom ( ) : List
Résultat List

StartNewLife() public méthode

Restores the player to the starting point to try the level again.
public StartNewLife ( GraphicsDevice graphicsDevice ) : void
graphicsDevice GraphicsDevice
Résultat void

SubsTile() public méthode

public SubsTile ( Vector2 coordinate, Enumeration tileType ) : void
coordinate Vector2
tileType Enumeration
Résultat void

SubsTileState() public méthode

public SubsTileState ( Vector2 position, Enumeration state ) : void
position Vector2
state Enumeration
Résultat void

Update() public méthode

public Update ( GameTime gameTime, KeyboardState keyboardState, GamePadState gamePadState, TouchCollection touchState, AccelerometerState accelState, DisplayOrientation orientation ) : void
gameTime Microsoft.Xna.Framework.GameTime
keyboardState Microsoft.Xna.Framework.Input.KeyboardState
gamePadState Microsoft.Xna.Framework.Input.GamePadState
touchState TouchCollection
accelState AccelerometerState
orientation DisplayOrientation
Résultat void

getBoundTiles() public méthode

public getBoundTiles ( Rectangle playerBounds ) : Vector4
playerBounds Microsoft.Xna.Framework.Rectangle
Résultat Vector4

getCenterTile() public méthode

public getCenterTile ( Rectangle playerBounds ) : Vector2
playerBounds Microsoft.Xna.Framework.Rectangle
Résultat Vector2

Property Details

BOTTOM_LIMIT public_oe static_oe property

public static int BOTTOM_LIMIT
Résultat int

ExitTile public_oe property

public Exit,PrinceGame ExitTile
Résultat Exit

elements public_oe property

public List elements
Résultat List

heightInLevel public_oe property

public int heightInLevel
Résultat int

map public_oe property

public Map,PrinceGame map
Résultat Map

maze public_oe property

public Maze maze
Résultat Maze

roomIndex public_oe property

public int roomIndex
Résultat int

roomName public_oe property

public string roomName
Résultat string

roomStart public_oe property

public bool roomStart
Résultat bool

roomType public_oe property

public int roomType
Résultat int

roomX public_oe property

public int roomX
Résultat int

roomY public_oe property

public int roomY
Résultat int

roomZ public_oe property

public int roomZ
Résultat int

tilesTemporaney public_oe property

public ArrayList,System.Collections tilesTemporaney
Résultat System.Collections.ArrayList

widthInLevel public_oe property

public int widthInLevel
Résultat int