Interface CinematicEvent

All Superinterfaces:
Savable
All Known Implementing Classes:
AbstractCinematicEvent, AnimationEvent, AnimationTrack, AnimEvent, CameraEvent, Cinematic, GuiEvent, GuiTrack, MotionEvent, MotionTrack, SoundEvent, SoundTrack

public interface CinematicEvent extends Savable
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    method called when an event is removed from a cinematic this method should remove any reference to any external objects.
    void
    this method can be implemented if the event needs different handling when stopped naturally (when the event reach its end) or when it was forced stopped during playback otherwise it just calls regular stop()
    float
    Returns the actual duration of the animation
    float
    returns the initial duration of the animation at speed = 1 in seconds.
     
    returns the PlayState of the animation
    float
    returns the speed of the animation
    float
    returns the current time of the cinematic event
    void
    initEvent(Application app, Cinematic cinematic)
    initialize this event
    void
    internalUpdate(float tpf)
    called internally in the update method, place here anything you want to run in the update loop
    void
    Pauses the animation
    void
    Starts the animation
    void
    setInitialDuration(float initialDuration)
    Sets the duration of the animation at speed = 1, in seconds.
    void
     
    void
    setSpeed(float speed)
    Sets the speed of the animation (1 is normal speed, 2 is twice faster)
    void
    setTime(float time)
    Fast-forwards to the given time, where time=0 is the start of the event.
    void
    Stops the animation

    Methods inherited from interface com.jme3.export.Savable

    read, write
  • Method Details

    • play

      void play()
      Starts the animation
    • stop

      void stop()
      Stops the animation
    • forceStop

      void forceStop()
      this method can be implemented if the event needs different handling when stopped naturally (when the event reach its end) or when it was forced stopped during playback otherwise it just calls regular stop()
    • pause

      void pause()
      Pauses the animation
    • getDuration

      float getDuration()
      Returns the actual duration of the animation
      Returns:
      the duration
    • setSpeed

      void setSpeed(float speed)
      Sets the speed of the animation (1 is normal speed, 2 is twice faster)
      Parameters:
      speed - the desired speed (default=1)
    • getSpeed

      float getSpeed()
      returns the speed of the animation
      Returns:
      the speed
    • getPlayState

      PlayState getPlayState()
      returns the PlayState of the animation
      Returns:
      the plat state
    • setLoopMode

      void setLoopMode(LoopMode loop)
      Parameters:
      loop - Set the loop mode for the channel. The loop mode determines what will happen to the animation once it finishes playing. For more information, see the LoopMode enum class.
      See Also:
    • getLoopMode

      LoopMode getLoopMode()
      Returns:
      The loop mode currently set for the animation. The loop mode determines what will happen to the animation once it finishes playing. For more information, see the LoopMode enum class.
      See Also:
    • getInitialDuration

      float getInitialDuration()
      returns the initial duration of the animation at speed = 1 in seconds.
      Returns:
      the initial duration
    • setInitialDuration

      void setInitialDuration(float initialDuration)
      Sets the duration of the animation at speed = 1, in seconds.
      Parameters:
      initialDuration - the desired duration (in de-scaled seconds)
    • internalUpdate

      void internalUpdate(float tpf)
      called internally in the update method, place here anything you want to run in the update loop
      Parameters:
      tpf - time per frame
    • initEvent

      void initEvent(Application app, Cinematic cinematic)
      initialize this event
      Parameters:
      app - the application
      cinematic - the cinematic
    • setTime

      void setTime(float time)
      Fast-forwards to the given time, where time=0 is the start of the event.
      Parameters:
      time - the time to fast-forward to
    • getTime

      float getTime()
      returns the current time of the cinematic event
      Returns:
      the time
    • dispose

      void dispose()
      method called when an event is removed from a cinematic this method should remove any reference to any external objects.