C# Class ArcadeRPG.GameEngine

This is the GameEngine
ファイルを表示 Open project: jkeech/Super-Space-Escape Class Usage Examples

Public Properties

Property Type Description
currTime TimeSpan
gameEnded bool
hurt_time int
levelnum int
livesRemaining int

Public Methods

Method Description
Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void

This is called when the game should draw itself.

GameEngine ( ArcadeRPG.TimeExpired t, GameOver g ) : System
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 ( Microsoft.Xna.Framework.Content.ContentManager Content ) : void

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

LoadLevel ( int level_num ) : void
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.

die ( ) : void
drawItems ( SpriteBatch sb, SpriteFont sf ) : void
hasMoreLives ( ) : Boolean
hasTimeLeft ( ) : bool
resetTimer ( ) : void
testAtExit ( int x, int y ) : bool

Method Details

Draw() public method

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

GameEngine() public method

public GameEngine ( ArcadeRPG.TimeExpired t, GameOver g ) : System
t ArcadeRPG.TimeExpired
g GameOver
return System

Initialize() public 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.
public Initialize ( ) : void
return void

LoadContent() public method

LoadContent will be called once per game and is the place to load all of your content.
public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager Content ) : void
Content Microsoft.Xna.Framework.Content.ContentManager
return void

LoadLevel() public method

public LoadLevel ( int level_num ) : void
level_num int
return void

UnloadContent() public method

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

Update() public method

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

die() public method

public die ( ) : void
return void

drawItems() public method

public drawItems ( SpriteBatch sb, SpriteFont sf ) : void
sb SpriteBatch
sf SpriteFont
return void

hasMoreLives() public method

public hasMoreLives ( ) : Boolean
return Boolean

hasTimeLeft() public method

public hasTimeLeft ( ) : bool
return bool

resetTimer() public method

public resetTimer ( ) : void
return void

testAtExit() public method

public testAtExit ( int x, int y ) : bool
x int
y int
return bool

Property Details

currTime public_oe property

public TimeSpan currTime
return TimeSpan

gameEnded public_oe property

public bool gameEnded
return bool

hurt_time public_oe property

public int hurt_time
return int

levelnum public_oe property

public int levelnum
return int

livesRemaining public_oe property

public int livesRemaining
return int