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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidImplement 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.voidinitEvent(Application app, Cinematic cinematic) Initialize this event (called internally only).voidonPause()Implement this method with code that you want to execute when the event is paused.voidonPlay()Implement this method with code that you want to execute when the event is started.voidonStop()Implement this method with code that you want to execute when the event is stopped.voidonUpdate(float tpf) Implement this method with the code that you want to execute on update (only called when the event is playing).voidplay()Play this event.voidread(JmeImporter im) used internally for serializationvoidsetCameraName(String cameraName) voidsetCinematic(Cinematic cinematic) voidsetTime(float time) Fast-forwards the event to the given timestamp.voidwrite(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:AbstractCinematicEventInitialize this event (called internally only).- Specified by:
initEventin interfaceCinematicEvent- Overrides:
initEventin classAbstractCinematicEvent- Parameters:
app- ignoredcinematic- ignored
-
play
public void play()Description copied from class:AbstractCinematicEventPlay this event.- Specified by:
playin interfaceCinematicEvent- Overrides:
playin classAbstractCinematicEvent
-
onPlay
public void onPlay()Description copied from class:AbstractCinematicEventImplement this method with code that you want to execute when the event is started.- Specified by:
onPlayin classAbstractCinematicEvent
-
onUpdate
public void onUpdate(float tpf) Description copied from class:AbstractCinematicEventImplement this method with the code that you want to execute on update (only called when the event is playing).- Specified by:
onUpdatein classAbstractCinematicEvent- Parameters:
tpf- time per frame
-
onStop
public void onStop()Description copied from class:AbstractCinematicEventImplement this method with code that you want to execute when the event is stopped.- Specified by:
onStopin classAbstractCinematicEvent
-
onPause
public void onPause()Description copied from class:AbstractCinematicEventImplement this method with code that you want to execute when the event is paused.- Specified by:
onPausein classAbstractCinematicEvent
-
forceStop
public void forceStop()Description copied from class:AbstractCinematicEventImplement 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:
forceStopin interfaceCinematicEvent- Overrides:
forceStopin classAbstractCinematicEvent
-
setTime
public void setTime(float time) Description copied from class:AbstractCinematicEventFast-forwards the event to the given timestamp. Time=0 is the start of the event.- Specified by:
setTimein interfaceCinematicEvent- Overrides:
setTimein classAbstractCinematicEvent- Parameters:
time- the time to fast-forward to.
-
getCinematic
-
setCinematic
-
write
used internally for serialization- Specified by:
writein interfaceSavable- Overrides:
writein classAbstractCinematicEvent- Parameters:
ex- the exporter (not null)- Throws:
IOException- from the exporter
-
read
used internally for serialization- Specified by:
readin interfaceSavable- Overrides:
readin classAbstractCinematicEvent- Parameters:
im- the importer (not null)- Throws:
IOException- from the importer
-