C# 클래스 geek.GameEngine.Sprites.AnimatedSprite

This is a game component that implements IUpdateable.
상속: SpriteBase
파일 보기 프로젝트 열기: impworks/xna.geek.engine 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Looped bool

공개 메소드들

메소드 설명
AnimatedSprite ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex, int frameCount, float frameRate ) : System
Draw ( SpriteBatch batch, bool disableLayering = false ) : void

Draws the current sprite frame to the screen.

GetTextureRegion ( Rectangle rect ) : Color[]

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

Pause ( ) : void

Pauses the animation at current frame.

Reset ( ) : void

Reset the sprite.

SetFrame ( int frame ) : void

Sets the current frame.

Start ( ) : void

Start the animation.

Stop ( ) : void

Stops the animation and rewinds it to the first frame.

Update ( ) : void

Update the sprite.

메소드 상세

AnimatedSprite() 공개 메소드

public AnimatedSprite ( GameObject parent, Microsoft.Xna.Framework.Graphics.Texture2D tex, int frameCount, float frameRate ) : System
parent geek.GameEngine.Visuals.GameObject
tex Microsoft.Xna.Framework.Graphics.Texture2D
frameCount int
frameRate float
리턴 System

Draw() 공개 메소드

Draws the current sprite frame 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.
리턴 void

GetTextureRegion() 공개 메소드

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.
리턴 Color[]

Pause() 공개 메소드

Pauses the animation at current frame.
public Pause ( ) : void
리턴 void

Reset() 공개 메소드

Reset the sprite.
public Reset ( ) : void
리턴 void

SetFrame() 공개 메소드

Sets the current frame.
public SetFrame ( int frame ) : void
frame int Frame id (0-based).
리턴 void

Start() 공개 메소드

Start the animation.
public Start ( ) : void
리턴 void

Stop() 공개 메소드

Stops the animation and rewinds it to the first frame.
public Stop ( ) : void
리턴 void

Update() 공개 메소드

Update the sprite.
public Update ( ) : void
리턴 void

프로퍼티 상세

Looped 공개적으로 프로퍼티

The flag indicating whether animation should loop after it has finished, or display the last frame until it's changed.
public bool Looped
리턴 bool