public class CameraEvent extends AbstractCinematicEvent
initialDuration, listeners, loopMode, playState, resuming, speed, time
Constructor and Description |
---|
CameraEvent() |
CameraEvent(Cinematic parentEvent,
java.lang.String cameraName) |
Modifier and Type | Method and Description |
---|---|
void |
forceStop()
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.
|
java.lang.String |
getCameraName() |
Cinematic |
getCinematic() |
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 serialization
|
void |
setCameraName(java.lang.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 serialization
|
addListener, dispose, getDuration, getInitialDuration, getLoopMode, getPlayState, getSpeed, getTime, internalUpdate, pause, removeListener, setInitialDuration, setLoopMode, setSpeed, stop
public CameraEvent()
public CameraEvent(Cinematic parentEvent, java.lang.String cameraName)
public java.lang.String getCameraName()
public void setCameraName(java.lang.String cameraName)
public void initEvent(Application app, Cinematic cinematic)
AbstractCinematicEvent
initEvent
in interface CinematicEvent
initEvent
in class AbstractCinematicEvent
app
- ignoredcinematic
- ignoredpublic void play()
AbstractCinematicEvent
play
in interface CinematicEvent
play
in class AbstractCinematicEvent
public void onPlay()
AbstractCinematicEvent
onPlay
in class AbstractCinematicEvent
public void onUpdate(float tpf)
AbstractCinematicEvent
onUpdate
in class AbstractCinematicEvent
tpf
- time per framepublic void onStop()
AbstractCinematicEvent
onStop
in class AbstractCinematicEvent
public void onPause()
AbstractCinematicEvent
onPause
in class AbstractCinematicEvent
public void forceStop()
AbstractCinematicEvent
forceStop
in interface CinematicEvent
forceStop
in class AbstractCinematicEvent
public void setTime(float time)
AbstractCinematicEvent
setTime
in interface CinematicEvent
setTime
in class AbstractCinematicEvent
time
- the time to fast-forward to.public Cinematic getCinematic()
public void setCinematic(Cinematic cinematic)
public void write(JmeExporter ex) throws java.io.IOException
write
in interface Savable
write
in class AbstractCinematicEvent
ex
- the exporter (not null)java.io.IOException
- from the exporterpublic void read(JmeImporter im) throws java.io.IOException
read
in interface Savable
read
in class AbstractCinematicEvent
im
- the importer (not null)java.io.IOException
- from the importer