C# Class Project_Starfighter.MenuComponent

This is a game component that implements IUpdateable.
Inheritance: Microsoft.Xna.Framework.DrawableGameComponent
ファイルを表示 Open project: csce3513/Team15 Class Usage Examples

Public Methods

Method Description
CheckKey ( Keys theKey ) : bool
Draw ( GameTime gameTime ) : void

Initialize ( ) : void

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.

MeasureMenu ( ) : void

Measures the game menu screen and finds the center.

MenuComponent ( Microsoft.Xna.Framework.Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, string menuItems ) : System

Main method to create all the components of this game screen.

Update ( GameTime gameTime ) : void

Allows the game component to update itself.

Method Details

CheckKey() public method

public CheckKey ( Keys theKey ) : bool
theKey Keys
return bool

Draw() public method

public Draw ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void

Initialize() public method

Allows the game component to perform any initialization it needs to before starting to run. This is where it can query for any required services and load content.
public Initialize ( ) : void
return void

MeasureMenu() public method

Measures the game menu screen and finds the center.
public MeasureMenu ( ) : void
return void

MenuComponent() public method

Main method to create all the components of this game screen.
public MenuComponent ( Microsoft.Xna.Framework.Game game, SpriteBatch spriteBatch, SpriteFont spriteFont, string menuItems ) : System
game Microsoft.Xna.Framework.Game
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
spriteFont Microsoft.Xna.Framework.Graphics.SpriteFont
menuItems string
return System

Update() public method

Allows the game component to update itself.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime Provides a snapshot of timing values.
return void