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.
Afficher le fichier Open project: tinco/Farseer-Physics Class Usage Examples

Méthodes publiques

Méthode 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 méthode

public Collide ( Vector2 position ) : void
position Vector2
Résultat void

Draw() public méthode

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

MenuButton() public méthode

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
Résultat System

Update() public méthode

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