C# Class Sharpcraft.Sharpcraft

Main class of Sharpcraft, this is the game itself.
Most documentation in this class comes from XNA.
Inheritance: Microsoft.Xna.Framework.Game
显示文件 Open project: SijmenSchoon/Sharpcraft Class Usage Examples

Private Properties

Property Type Description
ToggleFullscreen void
ToggleGameMenu void

Public Methods

Method Description
Sharpcraft ( User user ) : System

Initializes a new instance of Sharpcraft.

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.

OnDeactivated ( object sender, EventArgs args ) : void

Event handler for when the game loses focus.

Displays game menu to allow mouse movement when game is minimized/in the background.

OnExiting ( object sender, EventArgs args ) : void

Writes settings to file and then exits the game.

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
ToggleFullscreen ( ) : void
ToggleGameMenu ( ) : void

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

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

OnDeactivated() protected method

Event handler for when the game loses focus.
Displays game menu to allow mouse movement when game is minimized/in the background.
protected OnDeactivated ( object sender, EventArgs args ) : void
sender object N/A (Not Used) (See XNA Documentation)
args System.EventArgs N/A (Not Used) (See XNA Documentation)
return void

OnExiting() protected method

Writes settings to file and then exits the game.
protected OnExiting ( object sender, EventArgs args ) : void
sender object N/A (Not Used) (See XNA Documentation)
args System.EventArgs N/A (Not Used) (See XNA Documentation)
return void

Sharpcraft() public method

Initializes a new instance of Sharpcraft.
public Sharpcraft ( User user ) : System
user User
return System

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