Package com.jme3.cinematic.events
Class AnimationEvent
java.lang.Object
com.jme3.cinematic.events.AbstractCinematicEvent
com.jme3.cinematic.events.AnimationEvent
- All Implemented Interfaces:
CinematicEvent
,Savable
- Direct Known Subclasses:
AnimationTrack
Deprecated.
An event based on an animation of a model. The model has to hold an
AnimControl with valid animation (bone or spatial animations).
It helps to schedule the playback of an animation on a model in a Cinematic.
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Deprecated.protected float
Deprecated.protected AnimChannel
Deprecated.protected int
Deprecated.protected Cinematic
Deprecated.protected Spatial
Deprecated.static final String
Deprecated.protected String
Deprecated.static final int
Deprecated.Fields inherited from class com.jme3.cinematic.events.AbstractCinematicEvent
initialDuration, listeners, loopMode, playState, resuming, speed, time
-
Constructor Summary
ModifierConstructorDescriptionprotected
Deprecated.used for serialization don't call directly use one of the following constructorsAnimationEvent
(Spatial model, String animationName) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, float initialDuration) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, float initialDuration, float blendTime) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, float initialDuration, int channelIndex) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, float initialDuration, LoopMode loopMode) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, float initialDuration, LoopMode loopMode, float blendTime) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, float initialDuration, LoopMode loopMode, int channelIndex) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, int channelIndex) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, LoopMode loopMode) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, LoopMode loopMode, float blendTime) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, LoopMode loopMode, int channelIndex) Deprecated.creates an animation eventAnimationEvent
(Spatial model, String animationName, LoopMode loopMode, int channelIndex, float blendTime) Deprecated.creates an animation event -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
Deprecated.method called when an event is removed from a cinematic this method should remove any reference to any external objects.void
Deprecated.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) Deprecated.Initialize this event (called internally only).void
onPause()
Deprecated.Implement this method with code that you want to execute when the event is paused.void
onPlay()
Deprecated.Implement this method with code that you want to execute when the event is started.void
onStop()
Deprecated.Implement this method with code that you want to execute when the event is stopped.void
onUpdate
(float tpf) Deprecated.Implement this method with the code that you want to execute on update (only called when the event is playing).void
read
(JmeImporter im) Deprecated.Used for serialization only.void
setLoopMode
(LoopMode loopMode) Deprecated.Sets the loopMode of the animation.void
setSpeed
(float speed) Deprecated.Sets the speed of the animation.void
setTime
(float time) Deprecated.Fast-forwards the event to the given timestamp.void
write
(JmeExporter ex) Deprecated.Used for serialization only.Methods inherited from class com.jme3.cinematic.events.AbstractCinematicEvent
addListener, getDuration, getInitialDuration, getLoopMode, getPlayState, getSpeed, getTime, internalUpdate, pause, play, removeListener, setInitialDuration, stop
-
Field Details
-
SAVABLE_VERSION
public static final int SAVABLE_VERSIONDeprecated.- See Also:
-
MODEL_CHANNELS
Deprecated.- See Also:
-
channel
Deprecated. -
animationName
Deprecated. -
model
Deprecated. -
modelName
Deprecated. -
blendTime
protected float blendTimeDeprecated. -
channelIndex
protected int channelIndexDeprecated. -
cinematic
Deprecated.
-
-
Constructor Details
-
AnimationEvent
protected AnimationEvent()Deprecated.used for serialization don't call directly use one of the following constructors -
AnimationEvent
Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to play
-
AnimationEvent
Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playinitialDuration
- the initial duration of the event
-
AnimationEvent
Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playloopMode
- the loopMode- See Also:
-
AnimationEvent
public AnimationEvent(Spatial model, String animationName, float initialDuration, LoopMode loopMode) Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playinitialDuration
- the initial duration of the eventloopMode
- the loopMode- See Also:
-
AnimationEvent
Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playinitialDuration
- the initial duration of the eventblendTime
- the time interval during which the animation will be blended- See Also:
-
AnimationEvent
Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playloopMode
- the loopModeblendTime
- the time interval during which the animation will be blended- See Also:
-
AnimationEvent
public AnimationEvent(Spatial model, String animationName, float initialDuration, LoopMode loopMode, float blendTime) Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playinitialDuration
- the initial duration of the eventloopMode
- the loopModeblendTime
- the time interval during which the animation will be blended- See Also:
-
AnimationEvent
Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playloopMode
- the loopModechannelIndex
- the index of the channel default is 0. Events on the same channelIndex will use the same channel.- See Also:
-
AnimationEvent
Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playchannelIndex
- the index of the channel default is 0. Events on the same channelIndex will use the same channel.
-
AnimationEvent
public AnimationEvent(Spatial model, String animationName, LoopMode loopMode, int channelIndex, float blendTime) Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playloopMode
- the desired mode (Loop/DontLoop/Cycle)channelIndex
- the index of the channel default is 0. Events on theblendTime
- the time interval during which the animation will be blended same channelIndex will use the same channel.
-
AnimationEvent
Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playinitialDuration
- the initial duration of the eventchannelIndex
- the index of the channel default is 0. Events on the same channelIndex will use the same channel.
-
AnimationEvent
public AnimationEvent(Spatial model, String animationName, float initialDuration, LoopMode loopMode, int channelIndex) Deprecated.creates an animation event- Parameters:
model
- the model on which the animation will be playedanimationName
- the name of the animation to playinitialDuration
- the initial duration of the eventloopMode
- the loopModechannelIndex
- the index of the channel default is 0. Events on the same channelIndex will use the same channel.- See Also:
-
-
Method Details
-
initEvent
Deprecated.Description copied from class:AbstractCinematicEvent
Initialize this event (called internally only).- Specified by:
initEvent
in interfaceCinematicEvent
- Overrides:
initEvent
in classAbstractCinematicEvent
- Parameters:
app
- ignoredcinematic
- ignored
-
setTime
public void setTime(float time) Deprecated.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.
-
onPlay
public void onPlay()Deprecated.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
-
setSpeed
public void setSpeed(float speed) Deprecated.Description copied from class:AbstractCinematicEvent
Sets the speed of the animation. At speed = 1, the animation will last initialDuration seconds, At speed = 2, the animation will last initialDuration/2...- Specified by:
setSpeed
in interfaceCinematicEvent
- Overrides:
setSpeed
in classAbstractCinematicEvent
- Parameters:
speed
- the desired speedup factor (default=1)
-
onUpdate
public void onUpdate(float tpf) Deprecated.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()Deprecated.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
-
forceStop
public void forceStop()Deprecated.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
-
onPause
public void onPause()Deprecated.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
-
setLoopMode
Deprecated.Description copied from class:AbstractCinematicEvent
Sets the loopMode of the animation.- Specified by:
setLoopMode
in interfaceCinematicEvent
- Overrides:
setLoopMode
in classAbstractCinematicEvent
- Parameters:
loopMode
- the desired mode (default=DontLoop)- See Also:
-
write
Deprecated.Description copied from class:AbstractCinematicEvent
Used for serialization only.- Specified by:
write
in interfaceSavable
- Overrides:
write
in classAbstractCinematicEvent
- Parameters:
ex
- exporter- Throws:
IOException
- from the exporter
-
read
Deprecated.Description copied from class:AbstractCinematicEvent
Used for serialization only.- Specified by:
read
in interfaceSavable
- Overrides:
read
in classAbstractCinematicEvent
- Parameters:
im
- importer- Throws:
IOException
- from the importer
-
dispose
public void dispose()Deprecated.Description copied from interface:CinematicEvent
method called when an event is removed from a cinematic this method should remove any reference to any external objects.- Specified by:
dispose
in interfaceCinematicEvent
- Overrides:
dispose
in classAbstractCinematicEvent
-
AnimEvent