Method | Description | |
---|---|---|
Dispose ( ) : void | ||
DrawBehind ( |
Draw everything in the level from background to foreground.
|
|
DrawInFront ( |
||
GetBounds ( int x, int y ) : RectangleF |
Gets the bounding rectangle of a tile in world space.
|
|
GetCollision ( int x, int y ) : 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.
|
|
GetTileCollisionBehindPlayer ( Vector2 playerPosition ) : TileCollision | ||
GetTileCollisionBelowPlayer ( Vector2 playerPosition ) : TileCollision | ||
Level ( String name, int width, int height, Microsoft.Xna.Framework.Content.ContentManager content ) : System | ||
LoadContent ( ) : void | ||
Update ( Player player, |
Updates all objects in the world, performs collision between them, and handles the time limit with scoring.
|
|
UpdateSpawn ( |
Called by a Spawner when it has been activated.
|
|
activate ( string active ) : void |
Activates a particular activatable.
|
|
addActivatable ( string tileID, IActivatable active ) : void |
Adds and activatable item to the activatables list.
|
|
addActivator ( string tileID, Tiles actor ) : void |
Adds an activator into the activators list.
|
|
addBind ( string actorName, string activeName ) : void |
Binds and activator to a particular activatable.
|
|
addMoveable ( string tileID, |
Adds a moveable tile to the level. If the ID of the tile already exists then the tile is linked to the exiting tile as its leader.
|
|
addTile ( int x, int y ) : void |
Adds an empty passable tile into the tile array.
|
|
addTile ( int x, int y, |
Adds a tile into the tile array.
|
|
getGridPosition ( float x, float y ) : Vector2 | ||
getTile ( int x, int y ) : |
||
isTileInBounds ( int x, int y ) : bool |
public DrawBehind ( |
||
gameTime | ||
spriteBatch | ||
return | void |
public DrawInFront ( |
||
gameTime | ||
spriteBatch | ||
return | void |
public GetBounds ( int x, int y ) : RectangleF | ||
x | int | |
y | int | |
return | RectangleF |
public GetCollision ( int x, int y ) : TileCollision | ||
x | int | |
y | int | |
return | TileCollision |
public GetTileCollisionBehindPlayer ( Vector2 playerPosition ) : TileCollision | ||
playerPosition | Vector2 | |
return | TileCollision |
public GetTileCollisionBelowPlayer ( Vector2 playerPosition ) : TileCollision | ||
playerPosition | Vector2 | |
return | TileCollision |
public Level ( String name, int width, int height, Microsoft.Xna.Framework.Content.ContentManager content ) : System | ||
name | String | |
width | int | |
height | int | |
content | Microsoft.Xna.Framework.Content.ContentManager | |
return | System |
public Update ( Player player, |
||
player | Player | |
gameTime | ||
keyboardState | ||
inputManager | InputManager | |
return | void |
public UpdateSpawn ( |
||
spawner | The spawner to set as the active spawn point. | |
return | void |
public activate ( string active ) : void | ||
active | string | The ID of the activatable. |
return | void |
public addActivatable ( string tileID, IActivatable active ) : void | ||
tileID | string | The ID of the tilwe. |
active | IActivatable | The activatable instance. |
return | void |
public addActivator ( string tileID, Tiles actor ) : void | ||
tileID | string | The ID of the tile. |
actor | Tiles | The activator instance. |
return | void |
public addBind ( string actorName, string activeName ) : void | ||
actorName | string | The activator which will trigger. |
activeName | string | The activatable which will be activated. |
return | void |
public addMoveable ( string tileID, |
||
tileID | string | The ID of the tile. |
mTile | The moveable tile instance. | |
return | void |
public addTile ( int x, int y, |
||
x | int | |
y | int | |
newTile | ||
return | void |
public getGridPosition ( float x, float y ) : Vector2 | ||
x | float | |
y | float | |
return | Vector2 |
public getTile ( int x, int y ) : |
||
x | int | |
y | int | |
return |
public isTileInBounds ( int x, int y ) : bool | ||
x | int | |
y | int | |
return | bool |