C# Class GPSTD_RM.Tower

All objects which are placeable by the player and fight against the creeps.
Inheritance: GameObject
Mostrar archivo Open project: dideler/gps-tower-defense Class Usage Examples

Protected Properties

Property Type Description
timeSinceLastReload System.TimeSpan

Public Methods

Method Description
Fire ( Creep target ) : void

Executes a "firing" function at the target creep.

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

Initialize the tower with a reference to a game.

Update ( GameTime time ) : void

Protected Methods

Method Description
LocateTarget ( ) : Creep

A private method that most towers implement to find the creep closest to them.

Method Details

Fire() public method

Executes a "firing" function at the target creep.
public Fire ( Creep target ) : void
target Creep
return void

LocateTarget() protected method

A private method that most towers implement to find the creep closest to them.
protected LocateTarget ( ) : Creep
return Creep

Tower() public method

Initialize the tower with a reference to a game.
public Tower ( Microsoft.Xna.Framework.Game game ) : System
game Microsoft.Xna.Framework.Game The game containing this object.
return System

Update() public method

public Update ( GameTime time ) : void
time Microsoft.Xna.Framework.GameTime
return void

Property Details

timeSinceLastReload protected_oe property

Used locally to keep track of reloading.
protected TimeSpan,System timeSinceLastReload
return System.TimeSpan