Package com.jme3.cinematic.events
Class CameraEvent
java.lang.Object
com.jme3.cinematic.events.AbstractCinematicEvent
com.jme3.cinematic.events.CameraEvent
- All Implemented Interfaces:
CinematicEvent
,Savable
-
Field Summary
Fields inherited from class com.jme3.cinematic.events.AbstractCinematicEvent
initialDuration, listeners, loopMode, playState, resuming, speed, time
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Implement this method if the event needs different handling when stopped naturally (when the event reach its end), or when it was force-stopped during playback.void
initEvent
(Application app, Cinematic cinematic) Initialize this event (called internally only).void
onPause()
Implement this method with code that you want to execute when the event is paused.void
onPlay()
Implement this method with code that you want to execute when the event is started.void
onStop()
Implement this method with code that you want to execute when the event is stopped.void
onUpdate
(float tpf) Implement this method with the code that you want to execute on update (only called when the event is playing).void
play()
Play this event.void
read
(JmeImporter im) used internally for serializationvoid
setCameraName
(String cameraName) void
setCinematic
(Cinematic cinematic) void
setTime
(float time) Fast-forwards the event to the given timestamp.void
write
(JmeExporter ex) used internally for serializationMethods inherited from class com.jme3.cinematic.events.AbstractCinematicEvent
addListener, dispose, getDuration, getInitialDuration, getLoopMode, getPlayState, getSpeed, getTime, internalUpdate, pause, removeListener, setInitialDuration, setLoopMode, setSpeed, stop
-
Constructor Details
-
CameraEvent
public CameraEvent() -
CameraEvent
-
-
Method Details
-
getCameraName
-
setCameraName
-
initEvent
Description copied from class:AbstractCinematicEvent
Initialize this event (called internally only).- Specified by:
initEvent
in interfaceCinematicEvent
- Overrides:
initEvent
in classAbstractCinematicEvent
- Parameters:
app
- ignoredcinematic
- ignored
-
play
public void play()Description copied from class:AbstractCinematicEvent
Play this event.- Specified by:
play
in interfaceCinematicEvent
- Overrides:
play
in classAbstractCinematicEvent
-
onPlay
public void onPlay()Description copied from class:AbstractCinematicEvent
Implement this method with code that you want to execute when the event is started.- Specified by:
onPlay
in classAbstractCinematicEvent
-
onUpdate
public void onUpdate(float tpf) Description copied from class:AbstractCinematicEvent
Implement this method with the code that you want to execute on update (only called when the event is playing).- Specified by:
onUpdate
in classAbstractCinematicEvent
- Parameters:
tpf
- time per frame
-
onStop
public void onStop()Description copied from class:AbstractCinematicEvent
Implement this method with code that you want to execute when the event is stopped.- Specified by:
onStop
in classAbstractCinematicEvent
-
onPause
public void onPause()Description copied from class:AbstractCinematicEvent
Implement this method with code that you want to execute when the event is paused.- Specified by:
onPause
in classAbstractCinematicEvent
-
forceStop
public void forceStop()Description copied from class:AbstractCinematicEvent
Implement this method if the event needs different handling when stopped naturally (when the event reach its end), or when it was force-stopped during playback. By default, this method just calls regular stop().- Specified by:
forceStop
in interfaceCinematicEvent
- Overrides:
forceStop
in classAbstractCinematicEvent
-
setTime
public void setTime(float time) Description copied from class:AbstractCinematicEvent
Fast-forwards the event to the given timestamp. Time=0 is the start of the event.- Specified by:
setTime
in interfaceCinematicEvent
- Overrides:
setTime
in classAbstractCinematicEvent
- Parameters:
time
- the time to fast-forward to.
-
getCinematic
-
setCinematic
-
write
used internally for serialization- Specified by:
write
in interfaceSavable
- Overrides:
write
in classAbstractCinematicEvent
- Parameters:
ex
- the exporter (not null)- Throws:
IOException
- from the exporter
-
read
used internally for serialization- Specified by:
read
in interfaceSavable
- Overrides:
read
in classAbstractCinematicEvent
- Parameters:
im
- the importer (not null)- Throws:
IOException
- from the importer
-