C# Class GPSTD_RM.Game1

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

Méthodes publiques

Свойство 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

Méthodes publiques

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

Méthodes protégées

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

Méthode Description
ReceivedLocationCoordinates ( object sender, OpenReadCompletedEventArgs e ) : void

Event handler called when location coordinates are received.

Method Details

AddScore() public méthode

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

Draw() protected méthode

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

FocusOnLocationAsync() public méthode

TODO
public FocusOnLocationAsync ( string locationToFocusOn ) : void
locationToFocusOn string
Résultat void

Game1() public méthode

public Game1 ( ) : System
Résultat System

GotSearchResult() public méthode

TODO
public GotSearchResult ( object sender, OpenReadCompletedEventArgs e ) : void
sender object
e System.Net.OpenReadCompletedEventArgs
Résultat void

Initialize() protected méthode

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
Résultat void

LoadContent() protected méthode

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

LoadLinesFromFile() public méthode

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

LoadScores() public méthode

Read scores from a file.
public LoadScores ( ) : List
Résultat List

LocationSelected() public méthode

TODO
public LocationSelected ( IAsyncResult result ) : void
result IAsyncResult
Résultat void

OnExiting() protected méthode

Exit handler.
protected OnExiting ( object sender, EventArgs args ) : void
sender object
args System.EventArgs
Résultat void

SaveScores() public méthode

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

UnloadContent() protected méthode

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

Update() protected méthode

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

geoWatcher_Position() public méthode

TODO
public geoWatcher_Position ( object sender, GeoPositionChangedEventArgs e ) : void
sender object
e GeoPositionChangedEventArgs
Résultat void

geoWatcher_StatusChanged() public méthode

TODO
public geoWatcher_StatusChanged ( object sender, GeoPositionStatusChangedEventArgs e ) : void
sender object
e GeoPositionStatusChangedEventArgs
Résultat void

touch() public méthode

Process touch events.
public touch ( ) : void
Résultat void

Property Details

StartTime public_oe property

public DateTime,System StartTime
Résultat System.DateTime

bingMapsViewer public_oe property

public BingMapsViewer,GPSTD_RM bingMapsViewer
Résultat BingMapsViewer

currentLocation public_oe property

public GeoCoordinate currentLocation
Résultat GeoCoordinate

currentState public_oe property

public GeoPositionStatus currentState
Résultat GeoPositionStatus

display_victory public_oe property

public bool display_victory
Résultat bool

finger public_oe property

A hitbox for the finger!
public Rectangle,Microsoft.Xna.Framework finger
Résultat Microsoft.Xna.Framework.Rectangle

fingerPosition public_oe property

Current location of the finger on screen.
public Vector2 fingerPosition
Résultat Vector2

font public_oe property

public SpriteFont,Microsoft.Xna.Framework.Graphics font
Résultat Microsoft.Xna.Framework.Graphics.SpriteFont

gameStartTime public_oe property

public double gameStartTime
Résultat double

graphics public_oe property

public GraphicsDeviceManager graphics
Résultat GraphicsDeviceManager

locationToFocusOn public_oe property

public String locationToFocusOn
Résultat String

money_text public_oe property

public double money_text
Résultat double

numSpawners public_oe property

public int numSpawners
Résultat int

paused public_oe property

public bool paused
Résultat bool

score public_oe property

public int score
Résultat int

screen public_oe property

public Screen,GPSTD_RM screen
Résultat Screen

screens public_oe property

public Screens,GPSTD_RM screens
Résultat Screens

selected public_oe property

public Selected selected
Résultat Selected

sfx public_oe property

public SFX,GPSTD_RM sfx
Résultat SFX

spriteBatch public_oe property

public SpriteBatch,Microsoft.Xna.Framework.Graphics spriteBatch
Résultat Microsoft.Xna.Framework.Graphics.SpriteBatch

startingCoordinate public_oe property

public GeoCoordinate startingCoordinate
Résultat GeoCoordinate

startingCoordinateXY public_oe property

public Vector2 startingCoordinateXY
Résultat Vector2

time public_oe property

public int time
Résultat int

total_lives public_oe property

public int total_lives
Résultat int

watcher public_oe property

public GeoCoordinateWatcher watcher
Résultat GeoCoordinateWatcher