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
FieldsModifier and TypeFieldDescriptionprotected StringDeprecated.protected floatDeprecated.protected AnimChannelDeprecated.protected intDeprecated.protected CinematicDeprecated.protected SpatialDeprecated.static final StringDeprecated.protected StringDeprecated.static final intDeprecated.Fields inherited from class com.jme3.cinematic.events.AbstractCinematicEvent
initialDuration, listeners, loopMode, playState, resuming, speed, time -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.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 TypeMethodDescriptionvoiddispose()Deprecated.method called when an event is removed from a cinematic this method should remove any reference to any external objects.voidDeprecated.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.voidinitEvent(Application app, Cinematic cinematic) Deprecated.Initialize this event (called internally only).voidonPause()Deprecated.Implement this method with code that you want to execute when the event is paused.voidonPlay()Deprecated.Implement this method with code that you want to execute when the event is started.voidonStop()Deprecated.Implement this method with code that you want to execute when the event is stopped.voidonUpdate(float tpf) Deprecated.Implement this method with the code that you want to execute on update (only called when the event is playing).voidread(JmeImporter im) Deprecated.Used for serialization only.voidsetLoopMode(LoopMode loopMode) Deprecated.Sets the loopMode of the animation.voidsetSpeed(float speed) Deprecated.Sets the speed of the animation.voidsetTime(float time) Deprecated.Fast-forwards the event to the given timestamp.voidwrite(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:AbstractCinematicEventInitialize this event (called internally only).- Specified by:
initEventin interfaceCinematicEvent- Overrides:
initEventin classAbstractCinematicEvent- Parameters:
app- ignoredcinematic- ignored
-
setTime
public void setTime(float time) Deprecated.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.
-
onPlay
public void onPlay()Deprecated.Description copied from class:AbstractCinematicEventImplement this method with code that you want to execute when the event is started.- Specified by:
onPlayin classAbstractCinematicEvent
-
setSpeed
public void setSpeed(float speed) Deprecated.Description copied from class:AbstractCinematicEventSets 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:
setSpeedin interfaceCinematicEvent- Overrides:
setSpeedin classAbstractCinematicEvent- Parameters:
speed- the desired speedup factor (default=1)
-
onUpdate
public void onUpdate(float tpf) Deprecated.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()Deprecated.Description copied from class:AbstractCinematicEventImplement this method with code that you want to execute when the event is stopped.- Specified by:
onStopin classAbstractCinematicEvent
-
forceStop
public void forceStop()Deprecated.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
-
onPause
public void onPause()Deprecated.Description copied from class:AbstractCinematicEventImplement this method with code that you want to execute when the event is paused.- Specified by:
onPausein classAbstractCinematicEvent
-
setLoopMode
Deprecated.Description copied from class:AbstractCinematicEventSets the loopMode of the animation.- Specified by:
setLoopModein interfaceCinematicEvent- Overrides:
setLoopModein classAbstractCinematicEvent- Parameters:
loopMode- the desired mode (default=DontLoop)- See Also:
-
write
Deprecated.Description copied from class:AbstractCinematicEventUsed for serialization only.- Specified by:
writein interfaceSavable- Overrides:
writein classAbstractCinematicEvent- Parameters:
ex- exporter- Throws:
IOException- from the exporter
-
read
Deprecated.Description copied from class:AbstractCinematicEventUsed for serialization only.- Specified by:
readin interfaceSavable- Overrides:
readin classAbstractCinematicEvent- Parameters:
im- importer- Throws:
IOException- from the importer
-
dispose
public void dispose()Deprecated.Description copied from interface:CinematicEventmethod called when an event is removed from a cinematic this method should remove any reference to any external objects.- Specified by:
disposein interfaceCinematicEvent- Overrides:
disposein classAbstractCinematicEvent
-
AnimEvent