C# Class Swordening.LiveGrid

Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
Exibir arquivo Open project: ArghyV/Peliohjelmointi-s2011 Class Usage Examples

Public Methods

Method Description
CurrentTile ( ) : MapTile
Draw ( GameTime gameTime ) : void

Draws the contents on screen

Initialize ( ) : void
LiveGrid ( SwordeningGame game, MapGrid &mapGrid ) : System

Creates a new live grid.

MoveTo ( Direction dir ) : void

Moves to the given direction.

SetNewCenter ( int x, int z ) : void

Sets new MapTile as the center of the LiveGrid.

UpdateToTile ( int x, int z ) : void

Sets a new center for the grid if the given tile isn't current.

Private Methods

Method Description
UpdateGrid ( ) : void

Updates the 9 tiles of the LiveGrid.

Method Details

CurrentTile() public method

public CurrentTile ( ) : MapTile
return MapTile

Draw() public method

Draws the contents on screen
public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Initialize() public method

public Initialize ( ) : void
return void

LiveGrid() public method

Creates a new live grid.
public LiveGrid ( SwordeningGame game, MapGrid &mapGrid ) : System
game SwordeningGame
mapGrid MapGrid
return System

MoveTo() public method

Moves to the given direction.
public MoveTo ( Direction dir ) : void
dir Direction A compass point
return void

SetNewCenter() public method

Sets new MapTile as the center of the LiveGrid.
public SetNewCenter ( int x, int z ) : void
x int The centertile's x position in the MapGrid.
z int The centertile's z position in the MapGrid.
return void

UpdateToTile() public method

Sets a new center for the grid if the given tile isn't current.
public UpdateToTile ( int x, int z ) : void
x int
z int
return void