public interface CinematicEvent extends Savable
Modifier and Type | Method and Description |
---|---|
void |
dispose()
method called when an event is removed from a cinematic
this method should remove any reference to any external objects.
|
void |
forceStop()
this method can be implemented if the event needs different handling when
stopped naturally (when the event reach its end)
or when it was forced stopped during playback
otherwise it just call regular stop()
|
float |
getDuration()
Returns the actual duration of the animation
|
float |
getInitialDuration()
returns the initial duration of the animation at speed = 1 in seconds.
|
LoopMode |
getLoopMode() |
PlayState |
getPlayState()
returns the PlayState of the animation
|
float |
getSpeed()
returns the speed of the animation
|
float |
getTime()
returns the current time of the cinematic event
|
void |
initEvent(Application app,
Cinematic cinematic)
initialize this event
|
void |
internalUpdate(float tpf)
called internally in the update method, place here anything you want to run in the update loop
|
void |
pause()
Pauses the animation
|
void |
play()
Starts the animation
|
void |
setInitialDuration(float initialDuration)
Sets the duration of the antionamtion at speed = 1 in seconds
|
void |
setLoopMode(LoopMode loop) |
void |
setSpeed(float speed)
Sets the speed of the animation (1 is normal speed, 2 is twice faster)
|
void |
setTime(float time)
When this method is invoked, the event should fast forward to the given time according time 0 is the start of the event.
|
void |
stop()
Stops the animation
|
void play()
void stop()
void forceStop()
void pause()
float getDuration()
void setSpeed(float speed)
speed
- float getSpeed()
PlayState getPlayState()
void setLoopMode(LoopMode loop)
loop
- Set the loop mode for the channel. The loop mode
determines what will happen to the animation once it finishes
playing.
For more information, see the LoopMode enum class.LoopMode
LoopMode getLoopMode()
LoopMode
float getInitialDuration()
void setInitialDuration(float initialDuration)
initialDuration
- void internalUpdate(float tpf)
tpf
- time per framevoid initEvent(Application app, Cinematic cinematic)
app
- the applicationcinematic
- the cinematicvoid setTime(float time)
time
- the time to fast forward tofloat getTime()
void dispose()