C# Класс geek.GameEngine.Sprites.AnimatedSprite

This is a game component that implements IUpdateable.
Наследование: SpriteBase
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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