C# Класс PrinceGame.RoomNew

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

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

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

Приватные методы

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

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

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

Unloads the level content.
public Dispose ( ) : void
Результат void

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

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

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

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

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

public DrawSprites ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
Результат void

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

Gets the bounding rectangle of a Tile in world space.
public GetBounds ( int x, int y ) : Rectangle
x int
y int
Результат Microsoft.Xna.Framework.Rectangle

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

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

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

public GetExit ( int x, int y ) : Exit
x int
y int
Результат Exit

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

public GetTile ( Vector2 playerPosition ) : Tile
playerPosition Vector2
Результат Tile

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

public GetTile ( int x, int y ) : Tile
x int
y int
Результат Tile

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

public GetTiles ( Enumeration tileType ) : List
tileType Enumeration
Результат List

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

public GetType ( int x, int y ) : Enumeration.TileType
x int
y int
Результат Enumeration.TileType

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

public LooseShake ( ) : void
Результат void

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

public RoomNew ( Maze maze, string filePath, int roomIndex, int roomType ) : System
maze Maze
filePath string
roomIndex int
roomType int
Результат System

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

public SpritesInRoom ( ) : List
Результат List

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

Restores the player to the starting point to try the level again.
public StartNewLife ( GraphicsDevice graphicsDevice ) : void
graphicsDevice GraphicsDevice
Результат void

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

public SubsTile ( Vector2 coordinate, Enumeration tileType ) : void
coordinate Vector2
tileType Enumeration
Результат void

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

public SubsTileState ( Vector2 position, Enumeration state ) : void
position Vector2
state Enumeration
Результат void

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

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

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

public getBoundTiles ( Rectangle playerBounds ) : Vector4
playerBounds Microsoft.Xna.Framework.Rectangle
Результат Vector4

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

public getCenterTile ( Rectangle playerBounds ) : Vector2
playerBounds Microsoft.Xna.Framework.Rectangle
Результат Vector2

Описание свойств

BOTTOM_LIMIT публичное статическое свойство

public static int BOTTOM_LIMIT
Результат int

ExitTile публичное свойство

public Exit,PrinceGame ExitTile
Результат Exit

elements публичное свойство

public List elements
Результат List

heightInLevel публичное свойство

public int heightInLevel
Результат int

map публичное свойство

public Map,PrinceGame map
Результат Map

maze публичное свойство

public Maze maze
Результат Maze

roomIndex публичное свойство

public int roomIndex
Результат int

roomName публичное свойство

public string roomName
Результат string

roomStart публичное свойство

public bool roomStart
Результат bool

roomType публичное свойство

public int roomType
Результат int

roomX публичное свойство

public int roomX
Результат int

roomY публичное свойство

public int roomY
Результат int

roomZ публичное свойство

public int roomZ
Результат int

tilesTemporaney публичное свойство

public ArrayList,System.Collections tilesTemporaney
Результат System.Collections.ArrayList

widthInLevel публичное свойство

public int widthInLevel
Результат int