C# Class geek.GameEngine.Sprites.Sprite

Basic class for a non-animated sprite.
Inheritance: SpriteBase
Mostra file Open project: impworks/xna.geek.engine

Public Methods

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

Display the sprite to the screen.

GetTextureRegion ( Rectangle rect ) : Color[]

Get a portion of the current frame's texture as a sequence of colors.

Sprite ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex ) : System

Method Details

Draw() public method

Display the sprite to the screen.
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

Get a portion of the current frame's texture as a sequence of colors.
public GetTextureRegion ( Rectangle rect ) : Color[]
rect Microsoft.Xna.Framework.Rectangle Rectangle to retrieve.
return Color[]

Sprite() public method

public Sprite ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex ) : System
parent geek.GameEngine.Visuals.GameObject
tex Microsoft.Xna.Framework.Graphics.Texture2D
return System