C# Class GPSTD_RM.Tower

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

Protected Properties

Свойство Type Description
timeSinceLastReload System.TimeSpan

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode Description
LocateTarget ( ) : Creep

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

Method Details

Fire() public méthode

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

LocateTarget() protected méthode

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

Tower() public méthode

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.
Résultat System

Update() public méthode

public Update ( GameTime time ) : void
time Microsoft.Xna.Framework.GameTime
Résultat void

Property Details

timeSinceLastReload protected_oe property

Used locally to keep track of reloading.
protected TimeSpan,System timeSinceLastReload
Résultat System.TimeSpan