C# Class geek.GameEngine.Sprites.BlendableSprite

Makes a sprite blended with given color. http://gamedev.stackexchange.com/questions/24825/xna-sprite-flash-effect
Inheritance: SpriteBase
Mostra file Open project: impworks/xna.geek.engine Class Usage Examples

Public Methods

Method Description
BlendableSprite ( GameObject parent, SpriteBase sprite, Microsoft.Xna.Framework.Color color ) : Microsoft.Xna.Framework
Draw ( SpriteBatch batch, bool disableLayering = false ) : void

Draw the texture into stencil buffer, and then use the stencil to draw a single-colored texture.

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

Private Methods

Method Description
BlendableSprite ( ) : Microsoft.Xna.Framework

Method Details

BlendableSprite() public method

public BlendableSprite ( GameObject parent, SpriteBase sprite, Microsoft.Xna.Framework.Color color ) : Microsoft.Xna.Framework
parent geek.GameEngine.Visuals.GameObject
sprite SpriteBase
color Microsoft.Xna.Framework.Color
return Microsoft.Xna.Framework

Draw() public method

Draw the texture into stencil buffer, and then use the stencil to draw a single-colored texture.
public 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 method

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

Reset() public method

public Reset ( ) : void
return void

Update() public method

public Update ( ) : void
return void