C# Class WindowsGame1.Button

Show file Open project: WINPROG20152016/Quiogue_TaptitanXNA Class Usage Examples

Public Properties

Property Type Description
curCost int
curStage int

Public Methods

Method Description
Button ( Microsoft.Xna.Framework.Content.ContentManager content, string buttonName, Vector2 buttonPosition ) : System
Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
LoadContent ( ) : void
Update ( GameTime gameTime, int mx, int my, bool mpressed, bool prev_mpressed ) : bool
hitImage ( float tx, float ty, Microsoft.Xna.Framework.Graphics.Texture2D texture, int x, int y ) : bool
hitImageAlpha ( Rectangle rect, Microsoft.Xna.Framework.Graphics.Texture2D texture, int x, int y ) : bool
upButton ( ) : int

Private Methods

Method Description
hitImageAlpha ( float tx, float ty, Microsoft.Xna.Framework.Graphics.Texture2D texture, int x, int y ) : bool

Method Details

Button() public method

public Button ( Microsoft.Xna.Framework.Content.ContentManager content, string buttonName, Vector2 buttonPosition ) : System
content Microsoft.Xna.Framework.Content.ContentManager
buttonName string
buttonPosition Vector2
return System

Draw() public method

public Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : void
gameTime Microsoft.Xna.Framework.GameTime
spriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

LoadContent() public method

public LoadContent ( ) : void
return void

Update() public method

public Update ( GameTime gameTime, int mx, int my, bool mpressed, bool prev_mpressed ) : bool
gameTime Microsoft.Xna.Framework.GameTime
mx int
my int
mpressed bool
prev_mpressed bool
return bool

hitImage() public method

public hitImage ( float tx, float ty, Microsoft.Xna.Framework.Graphics.Texture2D texture, int x, int y ) : bool
tx float
ty float
texture Microsoft.Xna.Framework.Graphics.Texture2D
x int
y int
return bool

hitImageAlpha() public method

public hitImageAlpha ( Rectangle rect, Microsoft.Xna.Framework.Graphics.Texture2D texture, int x, int y ) : bool
rect Microsoft.Xna.Framework.Rectangle
texture Microsoft.Xna.Framework.Graphics.Texture2D
x int
y int
return bool

upButton() public method

public upButton ( ) : int
return int

Property Details

curCost public property

public int curCost
return int

curStage public property

public int curStage
return int