C# Class geek.GameEngine.Sprites.SpriteBase

Show file Open project: impworks/xna.geek.engine Class Usage Examples

Public Methods

Method Description
Draw ( SpriteBatch batch, bool disableLayering = false ) : void

Outputs the sprite to the screen.

GetTextureRegion ( Rectangle rect ) : Microsoft.Xna.Framework.Color[]

Get a piece of sprite texture for collision detection.

Reset ( ) : void

Reset the sprite.

SetHotSpot ( HorizontalAlignment horizontal = HorizontalAlignment.Center, VerticalAlignment vertical = VerticalAlignment.Center ) : void

Set the hotspot to a particular place inside the sprite.

Update ( ) : void

Update the sprite.

Protected Methods

Method Description
SpriteBase ( GameObject parent ) : Microsoft.Xna.Framework
SpriteBase ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex ) : Microsoft.Xna.Framework

Method Details

Draw() public abstract method

Outputs the sprite to the screen.
public abstract Draw ( SpriteBatch batch, bool disableLayering = false ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch Sprite batch.
disableLayering bool Whether to use layer ordering or not.
return void

GetTextureRegion() public abstract method

Get a piece of sprite texture for collision detection.
public abstract GetTextureRegion ( Rectangle rect ) : Microsoft.Xna.Framework.Color[]
rect Microsoft.Xna.Framework.Rectangle Rectangle to get.
return Microsoft.Xna.Framework.Color[]

Reset() public method

Reset the sprite.
public Reset ( ) : void
return void

SetHotSpot() public method

Set the hotspot to a particular place inside the sprite.
public SetHotSpot ( HorizontalAlignment horizontal = HorizontalAlignment.Center, VerticalAlignment vertical = VerticalAlignment.Center ) : void
horizontal HorizontalAlignment
vertical VerticalAlignment
return void

SpriteBase() protected method

protected SpriteBase ( GameObject parent ) : Microsoft.Xna.Framework
parent geek.GameEngine.Visuals.GameObject
return Microsoft.Xna.Framework

SpriteBase() protected method

protected SpriteBase ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex ) : Microsoft.Xna.Framework
parent geek.GameEngine.Visuals.GameObject
tex Microsoft.Xna.Framework.Graphics.Texture2D
return Microsoft.Xna.Framework

Update() public method

Update the sprite.
public Update ( ) : void
return void