C# Класс SparrowSharp.Display.MovieClip

Наследование: Image, IAnimatable
Показать файл Открыть проект

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

Свойство Тип Описание
Loop bool

Открытые методы

Метод Описание
AddFrame ( Texture texture ) : void

Adds a frame to the end of the animation with a certain texture, using the default duration (1/fps).

AddFrame ( Texture texture, float duration ) : void

Adds a frame with a certain texture and duration.

AddFrame ( Texture texture, int position ) : void

Inserts a frame at the specified position. The successors will move down.

AddFrame ( Texture texture, int position, float duration, object sound = null ) : void

Adds a frame with a certain texture, duration and sound.

AdvanceTime ( float seconds ) : void
GetDurationAt ( int position ) : float

Returns the duration (in seconds) of a frame at a certain position.

GetTextureAt ( int position ) : Texture

Returns the texture of a frame at a certain position.

MovieClip ( IList textures, float fps ) : System

Initializes a MovieClip with an array of textures and the default number of frames per second.

MovieClip ( Texture texture, float fps ) : System

Initializes a movie with the first frame and the default number of frames per second.

Pause ( ) : void

Pause playback.

Play ( ) : void

Start playback. Beware that the clip has to be added to a Juggler too!

RemoveFrameAt ( int position ) : void

Removes the frame at the specified position. The successors will move up.

RemoveFromJuggler ( ) : void

Removes this object from its juggler(s) (if it has one)

SetDuration ( float duration, int position ) : void

Sets the duration of a certain frame in seconds.

SetSoundAt ( object sound, int position ) : void

Sets the sound that will be played back when a certain frame is active.

SetTexture ( Texture texture, int position ) : void

Sets the texture of a certain frame.

Stop ( ) : void

Stop playback. Resets currentFrame to beginning.

Приватные методы

Метод Описание
PlayCurrentSound ( ) : void
UpdateCurrentFrame ( ) : void

Описание методов

AddFrame() публичный Метод

Adds a frame to the end of the animation with a certain texture, using the default duration (1/fps).
public AddFrame ( Texture texture ) : void
texture Sparrow.Textures.Texture
Результат void

AddFrame() публичный Метод

Adds a frame with a certain texture and duration.
public AddFrame ( Texture texture, float duration ) : void
texture Sparrow.Textures.Texture
duration float
Результат void

AddFrame() публичный Метод

Inserts a frame at the specified position. The successors will move down.
public AddFrame ( Texture texture, int position ) : void
texture Sparrow.Textures.Texture
position int
Результат void

AddFrame() публичный Метод

Adds a frame with a certain texture, duration and sound.
public AddFrame ( Texture texture, int position, float duration, object sound = null ) : void
texture Sparrow.Textures.Texture
position int
duration float
sound object
Результат void

AdvanceTime() публичный Метод

public AdvanceTime ( float seconds ) : void
seconds float
Результат void

GetDurationAt() публичный Метод

Returns the duration (in seconds) of a frame at a certain position.
public GetDurationAt ( int position ) : float
position int
Результат float

GetTextureAt() публичный Метод

Returns the texture of a frame at a certain position.
public GetTextureAt ( int position ) : Texture
position int
Результат Sparrow.Textures.Texture

MovieClip() публичный Метод

Initializes a MovieClip with an array of textures and the default number of frames per second.
public MovieClip ( IList textures, float fps ) : System
textures IList
fps float
Результат System

MovieClip() публичный Метод

Initializes a movie with the first frame and the default number of frames per second.
public MovieClip ( Texture texture, float fps ) : System
texture Sparrow.Textures.Texture
fps float
Результат System

Pause() публичный Метод

Pause playback.
public Pause ( ) : void
Результат void

Play() публичный Метод

Start playback. Beware that the clip has to be added to a Juggler too!
public Play ( ) : void
Результат void

RemoveFrameAt() публичный Метод

Removes the frame at the specified position. The successors will move up.
public RemoveFrameAt ( int position ) : void
position int
Результат void

RemoveFromJuggler() публичный Метод

Removes this object from its juggler(s) (if it has one)
public RemoveFromJuggler ( ) : void
Результат void

SetDuration() публичный Метод

Sets the duration of a certain frame in seconds.
public SetDuration ( float duration, int position ) : void
duration float
position int
Результат void

SetSoundAt() публичный Метод

Sets the sound that will be played back when a certain frame is active.
public SetSoundAt ( object sound, int position ) : void
sound object
position int
Результат void

SetTexture() публичный Метод

Sets the texture of a certain frame.
public SetTexture ( Texture texture, int position ) : void
texture Sparrow.Textures.Texture
position int
Результат void

Stop() публичный Метод

Stop playback. Resets currentFrame to beginning.
public Stop ( ) : void
Результат void

Описание свойств

Loop публичное свойство

Indicates if the movie is looping.
public bool Loop
Результат bool