C# Class SafeAndFree.Board

Logic for the game board.
Inheritance: Screen
Mostrar archivo Open project: mokasocial/PrivacyDefense

Public Properties

Property Type Description
TileCenter Vector2
selectedTile Vector2

Public Methods

Method Description
Board ( ) : System

Constructor.

BuyPlaceTower ( TowerTypes type ) : void
Draw ( SpriteBatch spriteBatch ) : void

Called every draw loop from the GameEngine.

HandleClick ( TowerTypes towerType ) : void
Update ( ) : void

The update loop.

Protected Methods

Method Description
CheckButtonPress ( Vector2 check ) : bool
HandleCreepLoop ( ) : void
HandleInput ( ) : void
HandleProjectileLoop ( ) : void
HandleTowerLoop ( ) : void

Private Methods

Method Description
DrawUpgradeStuff ( SpriteBatch batch ) : void
InitInstanceData ( ) : void
LoadData ( ) : void

Load the paths, waypoints and wave data from xml.

UpdateTower ( Tower theOneToOneUp ) : void

Method Details

Board() public method

Constructor.
public Board ( ) : System
return System

BuyPlaceTower() public method

public BuyPlaceTower ( TowerTypes type ) : void
type TowerTypes
return void

CheckButtonPress() protected method

protected CheckButtonPress ( Vector2 check ) : bool
check Vector2
return bool

Draw() public method

Called every draw loop from the GameEngine.
public Draw ( SpriteBatch spriteBatch ) : void
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

HandleClick() public method

public HandleClick ( TowerTypes towerType ) : void
towerType TowerTypes
return void

HandleCreepLoop() protected method

protected HandleCreepLoop ( ) : void
return void

HandleInput() protected method

protected HandleInput ( ) : void
return void

HandleProjectileLoop() protected method

protected HandleProjectileLoop ( ) : void
return void

HandleTowerLoop() protected method

protected HandleTowerLoop ( ) : void
return void

Update() public method

The update loop.
public Update ( ) : void
return void

Property Details

TileCenter public_oe static_oe property

The offset (X and Y) from a tile's top left position that will give you the tile's center position.
public static Vector2 TileCenter
return Vector2

selectedTile public_oe property

public Vector2 selectedTile
return Vector2