C# Class SparrowSharp.Display.MovieClip

Inheritance: Image, IAnimatable
Afficher le fichier Open project: fmotagarcia/sparrow-sharp

Méthodes publiques

Свойство Type Description
Loop bool

Méthodes publiques

Méthode 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

Méthode Description
PlayCurrentSound ( ) : void
UpdateCurrentFrame ( ) : void

Method Details

AddFrame() public méthode

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
Résultat void

AddFrame() public méthode

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

AddFrame() public méthode

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
Résultat void

AddFrame() public méthode

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
Résultat void

AdvanceTime() public méthode

public AdvanceTime ( float seconds ) : void
seconds float
Résultat void

GetDurationAt() public méthode

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

GetTextureAt() public méthode

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

MovieClip() public méthode

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
Résultat System

MovieClip() public méthode

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
Résultat System

Pause() public méthode

Pause playback.
public Pause ( ) : void
Résultat void

Play() public méthode

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

RemoveFrameAt() public méthode

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

RemoveFromJuggler() public méthode

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

SetDuration() public méthode

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

SetSoundAt() public méthode

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
Résultat void

SetTexture() public méthode

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

Stop() public méthode

Stop playback. Resets currentFrame to beginning.
public Stop ( ) : void
Résultat void

Property Details

Loop public_oe property

Indicates if the movie is looping.
public bool Loop
Résultat bool