C# Class RecordRobot.Game1

This is the main type for your game
Inheritance: Microsoft.Xna.Framework.Game
Datei anzeigen Open project: scastle/EECS290_Project1 Class Usage Examples

Public Properties

Property Type Description
CurrentLevel Level
ExitStatus bool
Font Microsoft.Xna.Framework.Graphics.SpriteFont
GamePaused bool
MainGame RecordRobot.Screens.WorldScreen
StartTime System.DateTime
SumTime System.TimeSpan
Time System.DateTime
content Microsoft.Xna.Framework.Content.ContentManager
rand System.Random
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
tr System.IO.TextReader

Public Methods

Method Description
ExitGame ( ) : void
Game1 ( ) : System
GameOver ( ) : void
StartGame ( ) : void
ToTitle ( ) : void
Win ( ) : void
toSettings ( ) : void

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.

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.

Method Details

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

ExitGame() public static method

public static ExitGame ( ) : void
return void

Game1() public method

public Game1 ( ) : System
return System

GameOver() public static method

public static GameOver ( ) : void
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

StartGame() public static method

public static StartGame ( ) : void
return void

ToTitle() public static method

public static ToTitle ( ) : void
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

Win() public static method

public static Win ( ) : void
return void

toSettings() public static method

public static toSettings ( ) : void
return void

Property Details

CurrentLevel public_oe static_oe property

public static Level CurrentLevel
return Level

ExitStatus public_oe static_oe property

public static bool ExitStatus
return bool

Font public_oe static_oe property

public static SpriteFont,Microsoft.Xna.Framework.Graphics Font
return Microsoft.Xna.Framework.Graphics.SpriteFont

GamePaused public_oe static_oe property

public static bool GamePaused
return bool

MainGame public_oe static_oe property

public static WorldScreen,RecordRobot.Screens MainGame
return RecordRobot.Screens.WorldScreen

StartTime public_oe static_oe property

public static DateTime,System StartTime
return System.DateTime

SumTime public_oe static_oe property

public static TimeSpan,System SumTime
return System.TimeSpan

Time public_oe static_oe property

public static DateTime,System Time
return System.DateTime

content public_oe static_oe property

public static ContentManager,Microsoft.Xna.Framework.Content content
return Microsoft.Xna.Framework.Content.ContentManager

rand public_oe static_oe property

public static Random,System rand
return System.Random

spriteBatch public_oe static_oe property

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

tr public_oe static_oe property

public static TextReader,System.IO tr
return System.IO.TextReader