AnimationHelper

Helper to handle animation progress

Members

Functions

animate
int animate(long time)

Adds elapsed time; returns animation progress in interval 0..maxProgress while timeElapsed is between 0 and maxInterval; when interval exceeded, progress is maxProgress

getProgress
int getProgress(int maxProgress)

Returns animation progress in interval 0..maxProgress while timeElapsed is between 0 and maxInterval; when interval exceeded, progress is maxProgress

restart
void restart()

restart with same max interval and progress

start
void start(long maxInterval, int maxProgress)

start new animation interval

Properties

elapsed
long elapsed [@property getter]

returns time elapsed since start

finished
bool finished [@property getter]

Returns true if animation is finished

interval
long interval [@property getter]

get current time interval

interval
long interval [@property setter]

override current time interval, retaining the same progress %

progress
int progress [@property getter]

Returns animation progress in interval 0..maxProgress while timeElapsed is between 0 and maxInterval; when interval exceeded, progress is maxProgress

Meta