TimeAnimator.TimeListener


interface TimeAnimator.TimeListener


Implementors of this interface can set themselves as update listeners to a TimeAnimator instance to receive callbacks on every animation frame to receive the total time since the animator started and the delta time since the last frame. The first time the listener is called, deltaTime will be zero. The same is true for totalTime, unless the animator was set to a specific currentPlayTime prior to starting.

Summary

Public functions

Unit
onTimeUpdate(animation: TimeAnimator, totalTimeMs: Long, deltaTimeMs: Long)

Notifies listeners of the occurrence of another frame of the animation, along with information about the elapsed time.

Public functions

onTimeUpdate

fun onTimeUpdate(animation: TimeAnimator, totalTimeMs: Long, deltaTimeMs: Long): Unit

Notifies listeners of the occurrence of another frame of the animation, along with information about the elapsed time.

Parameters
animation: TimeAnimator

The animator sending out the notification.

totalTimeMs: Long

The total time elapsed since the animator started, in milliseconds.

deltaTimeMs: Long

The time elapsed since the previous frame, in milliseconds.