C# Класс CastleEscape.Map

Represents a map in the game. Author: Dennis Honeyman
Показать файл Открыть проект

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

Метод Описание
ChangeMap ( Directions direction ) : void

Changes the map by loading the correct map file for the specified direction.

DrawBase ( SpriteBatch spriteBatch, int xPos, int yPos ) : void

Renders the base of the map (everything below the player) at the specified coordinates.

DrawTop ( SpriteBatch spriteBatch, int xPos, int yPos ) : void

Renders the top of the map (everything above the player) at the specified coordinates.

GetNPEAt ( int x, int y ) : NPE

Returns the NPE at the specified location

IsCollisionAt ( int x, int y ) : bool

Tests to see if there is a collision at the specified coordinates.

LoadMap ( string filename ) : void

Loads a map from a file.

Map ( Microsoft.Xna.Framework.Game game ) : System

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

Метод Описание
addNPE ( NPE newNPE ) : void
dialogue ( string text ) : void
drawLayers ( List layers, SpriteBatch spriteBatch, int xPos, int yPos ) : void
drawNPEs ( SpriteBatch spriteBatch, int xPos, int yPos ) : void
getFlag ( string flag ) : bool
newNPE ( ) : NPE
parseLayer ( XmlNode layerData ) : int[][]
parseScriptFile ( string filename ) : void
parseTMXFile ( ) : void
save ( Player player ) : void
setEastMapfile ( string filename ) : void
setFlag ( string flag ) : void
setMapName ( string name ) : void
setNorthMapfile ( string filename ) : void
setSouthMapfile ( string filename ) : void
setTmxMapfile ( string filename ) : void
setWestMapfile ( string filename ) : void

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

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

Changes the map by loading the correct map file for the specified direction.
public ChangeMap ( Directions direction ) : void
direction Directions The direction to use
Результат void

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

Renders the base of the map (everything below the player) at the specified coordinates.
public DrawBase ( SpriteBatch spriteBatch, int xPos, int yPos ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
xPos int
yPos int
Результат void

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

Renders the top of the map (everything above the player) at the specified coordinates.
public DrawTop ( SpriteBatch spriteBatch, int xPos, int yPos ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
xPos int
yPos int
Результат void

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

Returns the NPE at the specified location
public GetNPEAt ( int x, int y ) : NPE
x int
y int
Результат NPE

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

Tests to see if there is a collision at the specified coordinates.
public IsCollisionAt ( int x, int y ) : bool
x int
y int
Результат bool

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

Loads a map from a file.
public LoadMap ( string filename ) : void
filename string The filename
Результат void

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

public Map ( Microsoft.Xna.Framework.Game game ) : System
game Microsoft.Xna.Framework.Game
Результат System