C# Class geek.GameEngine.Sprites.SpriteBase

Afficher le fichier Open project: impworks/xna.geek.engine Class Usage Examples

Méthodes publiques

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

Méthodes protégées

Méthode Description
SpriteBase ( GameObject parent ) : Microsoft.Xna.Framework
SpriteBase ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex ) : Microsoft.Xna.Framework

Method Details

Draw() public abstract méthode

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.
Résultat void

GetTextureRegion() public abstract méthode

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.
Résultat Microsoft.Xna.Framework.Color[]

Reset() public méthode

Reset the sprite.
public Reset ( ) : void
Résultat void

SetHotSpot() public méthode

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

SpriteBase() protected méthode

protected SpriteBase ( GameObject parent ) : Microsoft.Xna.Framework
parent geek.GameEngine.Visuals.GameObject
Résultat Microsoft.Xna.Framework

SpriteBase() protected méthode

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

Update() public méthode

Update the sprite.
public Update ( ) : void
Résultat void