C# Class FarseerPhysics.Samples.ScreenSystem.MenuButton

Helper class represents a single entry in a MenuScreen. By default this just draws the entry text string, but it can be customized to display menu entries in different ways. This also provides an event that will be raised when the menu entry is selected.
Mostra file Open project: tinco/Farseer-Physics Class Usage Examples

Public Methods

Method Description
Collide ( Vector2 position ) : void
Draw ( ) : void

Draws the menu entry. This can be overridden to customize the appearance.

MenuButton ( Microsoft.Xna.Framework.Graphics.Texture2D sprite, bool flip, Vector2 position, GameScreen screen ) : System

Constructs a new menu entry with the specified text.

Update ( GameTime gameTime ) : void

Updates the menu entry.

Method Details

Collide() public method

public Collide ( Vector2 position ) : void
position Vector2
return void

Draw() public method

Draws the menu entry. This can be overridden to customize the appearance.
public Draw ( ) : void
return void

MenuButton() public method

Constructs a new menu entry with the specified text.
public MenuButton ( Microsoft.Xna.Framework.Graphics.Texture2D sprite, bool flip, Vector2 position, GameScreen screen ) : System
sprite Microsoft.Xna.Framework.Graphics.Texture2D
flip bool
position Vector2
screen GameScreen
return System

Update() public method

Updates the menu entry.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
return void