C# Class WindowsGame1.Sprite

Show file Open project: csce3513/Team18 Class Usage Examples

Public Properties

Property Type Description
assetName string
sourceRect Rectangle
timer float

Protected Properties

Property Type Description
mPos Vector2
tex Texture2D

Public Methods

Method Description
Draw ( SpriteBatch theSpriteBatch ) : void
LoadContent ( Microsoft.Xna.Framework.Content.ContentManager theContentManager, string theAssetName ) : void
Sprite ( ) : System
Sprite ( int ID ) : System
Update ( GameTime theGameTime, Vector2 theSpeed, Vector2 theDirection ) : void
getPos ( ) : Vector2
getTex ( ) : Texture2D
updatePos ( Vector2 newPos ) : void

Private Methods

Method Description
Update ( GameTime gameTime ) : void

Method Details

Draw() public method

public Draw ( SpriteBatch theSpriteBatch ) : void
theSpriteBatch Microsoft.Xna.Framework.Graphics.SpriteBatch
return void

LoadContent() public method

public LoadContent ( Microsoft.Xna.Framework.Content.ContentManager theContentManager, string theAssetName ) : void
theContentManager Microsoft.Xna.Framework.Content.ContentManager
theAssetName string
return void

Sprite() public method

public Sprite ( ) : System
return System

Sprite() public method

public Sprite ( int ID ) : System
ID int
return System

Update() public method

public Update ( GameTime theGameTime, Vector2 theSpeed, Vector2 theDirection ) : void
theGameTime GameTime
theSpeed Vector2
theDirection Vector2
return void

getPos() public method

public getPos ( ) : Vector2
return Vector2

getTex() public method

public getTex ( ) : Texture2D
return Texture2D

updatePos() public method

public updatePos ( Vector2 newPos ) : void
newPos Vector2
return void

Property Details

assetName public property

public string assetName
return string

mPos protected property

protected Vector2 mPos
return Vector2

sourceRect public property

public Rectangle sourceRect
return Rectangle

tex protected property

protected Texture2D tex
return Texture2D

timer public property

public float timer
return float