Skip to main content

ZActionPlayer

actualpackageZActionPlayer
14 items

All

14
constructorZActionPlayer
constructor()
fun getCurrentKeyFrame(): ZKeyFrame?
Gets the current keyframe based on playback time
fun getCurrentTime(): Float
fun getDuration(): Float
fun getProgress(): Float
fun isPlaying(): Boolean
fun pause()
Pauses playback
funplay
fun play(loop: Boolean = false)
Starts playing the action
fun resetTimer()
Resets the internal time counter. Useful when a lot of time has passed since the last update and we don't want a large jump in the animation.
funseek
fun seek(time: Float)
Jumps to a specific point in time
fun setAction(obj: ZModel, action: ZSkeletalAction)
Sets the action to be played
fun setPlaybackSpeed(speed: Float)
Sets the playback speed
funstop
fun stop()
Stops playback and resets the time
fun update()
Updates the playback state by automatically calculating the time elapsed since the last call.