C# Class TapTitanXNA_JonryBorbe.Button

显示文件 Open project: WINPROG20152016/Borbe_TaptitanXNA Class Usage Examples

Public Methods

Method Description
Button ( Microsoft.Xna.Framework.Content.ContentManager content, string buttonName, Vector2 buttonPosition ) : System
Draw ( GameTime gameTime, SpriteBatch spriteBatch ) : 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

Private Methods

Method Description
LoadContent ( ) : void
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

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