C# Class GPSTD_RM.Game1

This is the main type for your game
Inheritance: Microsoft.Xna.Framework.Game
Show file Open project: dideler/gps-tower-defense Class Usage Examples

Public Properties

Property Type Description
StartTime System.DateTime
bingMapsViewer BingMapsViewer
currentLocation GeoCoordinate
currentState GeoPositionStatus
display_victory bool
finger Microsoft.Xna.Framework.Rectangle
fingerPosition Vector2
font Microsoft.Xna.Framework.Graphics.SpriteFont
gameStartTime double
graphics GraphicsDeviceManager
locationToFocusOn String
money_text double
numSpawners int
paused bool
score int
screen Screen
screens Screens
selected Selected
sfx SFX
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
startingCoordinate GeoCoordinate
startingCoordinateXY Vector2
time int
total_lives int
watcher GeoCoordinateWatcher

Public Methods

Method Description
AddScore ( int newscore ) : void

Add a score value to the list and sort the list.

FocusOnLocationAsync ( string locationToFocusOn ) : void

TODO

Game1 ( ) : System
GotSearchResult ( object sender, OpenReadCompletedEventArgs e ) : void

TODO

LoadLinesFromFile ( string fileName ) : LinkedList

Get a list of strings from a file, corresponding to each line.

LoadScores ( ) : List

Read scores from a file.

LocationSelected ( IAsyncResult result ) : void

TODO

SaveScores ( List scores ) : void

Write scores to a file.

geoWatcher_Position ( object sender, GeoPositionChangedEventArgs e ) : void

TODO

geoWatcher_StatusChanged ( object sender, GeoPositionStatusChangedEventArgs e ) : void

TODO

touch ( ) : void

Process touch events.

Protected Methods

Method Description
Draw ( GameTime gameTime ) : void

This is called when the game should draw itself.

Initialize ( ) : void

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.

LoadContent ( ) : void

LoadContent will be called once per game and is the place to load all of your content.

OnExiting ( object sender, EventArgs args ) : void

Exit handler.

UnloadContent ( ) : void

UnloadContent will be called once per game and is the place to unload all content.

Update ( GameTime gameTime ) : void

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.

Private Methods

Method Description
ReceivedLocationCoordinates ( object sender, OpenReadCompletedEventArgs e ) : void

Event handler called when location coordinates are received.

Method Details

AddScore() public method

Add a score value to the list and sort the list.
public AddScore ( int newscore ) : void
newscore int The new score value.
return void

Draw() protected method

This is called when the game should draw itself.
protected Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
return void

FocusOnLocationAsync() public method

TODO
public FocusOnLocationAsync ( string locationToFocusOn ) : void
locationToFocusOn string
return void

Game1() public method

public Game1 ( ) : System
return System

GotSearchResult() public method

TODO
public GotSearchResult ( object sender, OpenReadCompletedEventArgs e ) : void
sender object
e System.Net.OpenReadCompletedEventArgs
return void

Initialize() protected method

Allows the game to perform any initialization it needs to before starting to run. This is where it can query for any required services and load any non-graphic related content. Calling base.Initialize will enumerate through any components and initialize them as well.
protected Initialize ( ) : void
return void

LoadContent() protected method

LoadContent will be called once per game and is the place to load all of your content.
protected LoadContent ( ) : void
return void

LoadLinesFromFile() public method

Get a list of strings from a file, corresponding to each line.
public LoadLinesFromFile ( string fileName ) : LinkedList
fileName string The filename to be read.
return LinkedList

LoadScores() public method

Read scores from a file.
public LoadScores ( ) : List
return List

LocationSelected() public method

TODO
public LocationSelected ( IAsyncResult result ) : void
result IAsyncResult
return void

OnExiting() protected method

Exit handler.
protected OnExiting ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
return void

SaveScores() public method

Write scores to a file.
public SaveScores ( List scores ) : void
scores List A list of scores.
return void

UnloadContent() protected method

UnloadContent will be called once per game and is the place to unload all content.
protected UnloadContent ( ) : void
return void

Update() protected method

Allows the game to run logic such as updating the world, checking for collisions, gathering input, and playing audio.
protected Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
return void

geoWatcher_Position() public method

TODO
public geoWatcher_Position ( object sender, GeoPositionChangedEventArgs e ) : void
sender object
e GeoPositionChangedEventArgs
return void

geoWatcher_StatusChanged() public method

TODO
public geoWatcher_StatusChanged ( object sender, GeoPositionStatusChangedEventArgs e ) : void
sender object
e GeoPositionStatusChangedEventArgs
return void

touch() public method

Process touch events.
public touch ( ) : void
return void

Property Details

StartTime public property

public DateTime,System StartTime
return System.DateTime

bingMapsViewer public property

public BingMapsViewer,GPSTD_RM bingMapsViewer
return BingMapsViewer

currentLocation public property

public GeoCoordinate currentLocation
return GeoCoordinate

currentState public property

public GeoPositionStatus currentState
return GeoPositionStatus

display_victory public property

public bool display_victory
return bool

finger public property

A hitbox for the finger!
public Rectangle,Microsoft.Xna.Framework finger
return Microsoft.Xna.Framework.Rectangle

fingerPosition public property

Current location of the finger on screen.
public Vector2 fingerPosition
return Vector2

font public property

public SpriteFont,Microsoft.Xna.Framework.Graphics font
return Microsoft.Xna.Framework.Graphics.SpriteFont

gameStartTime public property

public double gameStartTime
return double

graphics public property

public GraphicsDeviceManager graphics
return GraphicsDeviceManager

locationToFocusOn public property

public String locationToFocusOn
return String

money_text public property

public double money_text
return double

numSpawners public property

public int numSpawners
return int

paused public property

public bool paused
return bool

score public property

public int score
return int

screen public property

public Screen,GPSTD_RM screen
return Screen

screens public property

public Screens,GPSTD_RM screens
return Screens

selected public property

public Selected selected
return Selected

sfx public property

public SFX,GPSTD_RM sfx
return SFX

spriteBatch public property

public SpriteBatch,Microsoft.Xna.Framework.Graphics spriteBatch
return Microsoft.Xna.Framework.Graphics.SpriteBatch

startingCoordinate public property

public GeoCoordinate startingCoordinate
return GeoCoordinate

startingCoordinateXY public property

public Vector2 startingCoordinateXY
return Vector2

time public property

public int time
return int

total_lives public property

public int total_lives
return int

watcher public property

public GeoCoordinateWatcher watcher
return GeoCoordinateWatcher