C# Class GPSTD_RM.SpawnPoint

Represents a point where enemies spawn.
Inheritance: GameObject
Show file Open project: dideler/gps-tower-defense

Public Properties

Property Type Description
emitFrequency double
hasBeenChecked bool
lastEmissionMS double
ready bool
started bool

Public Methods

Method Description
Draw ( GameTime time ) : void

Draws the spawn point and its path.

FindElement ( XmlReader reader, string name ) : void

Advances the cursor to the element with the specified name.

GetRouteFromServer ( string bingMapKey, GeoCoordinate sourceCoord, GeoCoordinate TargetCoord ) : void

Requests a route from the server. It will result in driving directions from the source coordinates to the target coordinates.

Prepare ( ) : void

Loads the route from the server, if necessary.

SpawnPoint ( Game1 game, Vector2 startPosition, Vector2 finalPosition ) : System
makeCreep ( GameTime gameTime ) : void

Spawns a Creep using the creep factory.

wcRoute_OpenReadCompleted ( object sender, OpenReadCompletedEventArgs e ) : void

Event handler for the completed bing maps request

Private Methods

Method Description
GetValue ( XmlReader reader ) : string

Keep reading until it has a value.

MakeBuffer ( ) : void

Create the vertex buffer for path drawing.

Method Details

Draw() public method

Draws the spawn point and its path.
public Draw ( GameTime time ) : void
time Microsoft.Xna.Framework.GameTime The current game time.
return void

FindElement() public method

Advances the cursor to the element with the specified name.
public FindElement ( XmlReader reader, string name ) : void
reader System.Xml.XmlReader An XML reader.
name string The name of the desired element.
return void

GetRouteFromServer() public method

Requests a route from the server. It will result in driving directions from the source coordinates to the target coordinates.
public GetRouteFromServer ( string bingMapKey, GeoCoordinate sourceCoord, GeoCoordinate TargetCoord ) : void
bingMapKey string API key for this application.
sourceCoord GeoCoordinate Beginning of the path.
TargetCoord GeoCoordinate End of the path.
return void

Prepare() public method

Loads the route from the server, if necessary.
public Prepare ( ) : void
return void

SpawnPoint() public method

public SpawnPoint ( Game1 game, Vector2 startPosition, Vector2 finalPosition ) : System
game Game1
startPosition Vector2
finalPosition Vector2
return System

makeCreep() public method

Spawns a Creep using the creep factory.
public makeCreep ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The current game time.
return void

wcRoute_OpenReadCompleted() public method

Event handler for the completed bing maps request
public wcRoute_OpenReadCompleted ( object sender, OpenReadCompletedEventArgs e ) : void
sender object Required for event handler.
e System.Net.OpenReadCompletedEventArgs Required for event handler.
return void

Property Details

emitFrequency public property

TODO
public double emitFrequency
return double

hasBeenChecked public property

TODO
public bool hasBeenChecked
return bool

lastEmissionMS public property

TODO
public double lastEmissionMS
return double

ready public property

TODO
public bool ready
return bool

started public property

TODO
public bool started
return bool