C# Class SparrowSharp.Display.MovieClip

Inheritance: Image, IAnimatable
Show file Open project: fmotagarcia/sparrow-sharp

Public Properties

Property Type Description
Loop bool

Public Methods

Method Description
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.

Private Methods

Method Description
PlayCurrentSound ( ) : void
UpdateCurrentFrame ( ) : void

Method Details

AddFrame() public method

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
return void

AddFrame() public method

Adds a frame with a certain texture and duration.
public AddFrame ( Texture texture, float duration ) : void
texture Sparrow.Textures.Texture
duration float
return void

AddFrame() public method

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
return void

AddFrame() public method

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
return void

AdvanceTime() public method

public AdvanceTime ( float seconds ) : void
seconds float
return void

GetDurationAt() public method

Returns the duration (in seconds) of a frame at a certain position.
public GetDurationAt ( int position ) : float
position int
return float

GetTextureAt() public method

Returns the texture of a frame at a certain position.
public GetTextureAt ( int position ) : Texture
position int
return Sparrow.Textures.Texture

MovieClip() public method

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
return System

MovieClip() public method

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
return System

Pause() public method

Pause playback.
public Pause ( ) : void
return void

Play() public method

Start playback. Beware that the clip has to be added to a Juggler too!
public Play ( ) : void
return void

RemoveFrameAt() public method

Removes the frame at the specified position. The successors will move up.
public RemoveFrameAt ( int position ) : void
position int
return void

RemoveFromJuggler() public method

Removes this object from its juggler(s) (if it has one)
public RemoveFromJuggler ( ) : void
return void

SetDuration() public method

Sets the duration of a certain frame in seconds.
public SetDuration ( float duration, int position ) : void
duration float
position int
return void

SetSoundAt() public method

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
return void

SetTexture() public method

Sets the texture of a certain frame.
public SetTexture ( Texture texture, int position ) : void
texture Sparrow.Textures.Texture
position int
return void

Stop() public method

Stop playback. Resets currentFrame to beginning.
public Stop ( ) : void
return void

Property Details

Loop public property

Indicates if the movie is looping.
public bool Loop
return bool