FAST SDK Coding Reference 1.0.3
|
A class to play an image sequence of Sprites
similar to a GIF.
More...
Public Member Functions | |
void | Pause () |
Pauses playback of the image sequence and keeps the current time. | |
void | Play () |
Starts playing the image sequence. | |
void | Stop () |
Stops playback of the image sequence and resets the current time to 0. | |
Public Attributes | |
Sprite[] | sprites |
Inspector, Runtime The Sprites that the image sequence is loaded into. | |
Image | uiImage |
Runtime The Image component that will render the current frame of the image sequence. | |
Properties | |
bool | IsPaused [get] |
Runtime Indicates the image squence is paused if true . | |
bool | IsPlaying [get] |
Runtime Indicates the image squence is playing if true . | |
Private Attributes | |
int | currentFrame |
Runtime The index of the current frame being played. | |
float | currentTime |
Runtime The elapsed play time of the image sequence in seconds. | |
int | frameCount |
Runtime The total number of frames in the image sequence. | |
float | frameRate = 1 |
Inspector The framerate that the image sequence will be played at, measured in frames per second (fps). | |
float | frameTime |
Runtime The duration of one frame of the image sequence in seconds. | |
bool | holdLastFrame = true |
Inspector Set to true if the last frame should be held when the image sequence finishes playing. Otherwise the Image.color will be set to clear/transparent. | |
bool | loopPlayback = false |
Inspector Set to true if the image sequence should play in a loop, otherwise it is played once. | |
bool | playOnAwake = true |
Inspector Set to true if the images sequence should start playing on Awake() or OnEnable() . | |
bool | skipOnDrop = true |
Inspector Set to true if frames should be skipped to catch up with the current time. | |
float | totalTime |
Runtime The duration of the image sequence in seconds. | |
A class to play an image sequence of Sprites
similar to a GIF.
The image is rendered to the UI as an Image
.
void Pause | ( | ) |
Pauses playback of the image sequence and keeps the current time.
void Play | ( | ) |
Starts playing the image sequence.
void Stop | ( | ) |
Stops playback of the image sequence and resets the current time to 0.
|
private |
Runtime
The index of the current frame being played.
|
private |
Runtime
The elapsed play time of the image sequence in seconds.
|
private |
Runtime
The total number of frames in the image sequence.
|
private |
Inspector
The framerate that the image sequence will be played at, measured in frames per second (fps).
The minimum framerate is 0.1fps.
|
private |
Runtime
The duration of one frame of the image sequence in seconds.
Depends on the FAST.ImagePlayer.frameRate.
|
private |
Inspector
Set to true
if the last frame should be held when the image sequence finishes playing. Otherwise the Image.color
will be set to clear/transparent.
|
private |
Inspector
Set to true
if the image sequence should play in a loop, otherwise it is played once.
|
private |
Inspector
Set to true
if the images sequence should start playing on Awake()
or OnEnable()
.
|
private |
Inspector
Set to true
if frames should be skipped to catch up with the current time.
Skipping frames will maintain the duration of the image sequence.
Sprite [] sprites |
Inspector, Runtime
The Sprites
that the image sequence is loaded into.
Use FAST.ImagePlayerFromFile to load these Sprites
at automatically runtime.
|
private |
Runtime
The duration of the image sequence in seconds.
Depends on the FAST.ImagePlayer.frameCount and FAST.ImagePlayer.frameTime.
Image uiImage |
Runtime
The Image
component that will render the current frame of the image sequence.
Retrieved at runtime from FAST.ImagePlayer.Awake and viewable in the Inspector. You can modify the assignment in code, but it is not recommended.
|
get |
Runtime
Indicates the image squence is paused if true
.
|
get |
Runtime
Indicates the image squence is playing if true
.