5 METHOD(
Animation, configureAnimation,
void(
entity this,
entity obj,
void(
entity,
float) objSetter,
float animStartTime,
float animDuration,
float animStartValue,
float animEndValue))
7 this.setObjectSetter(
this, obj, objSetter);
8 this.setTimeStartDuration(
this, animStartTime, animDuration);
9 this.setValueStartEnd(
this, animStartValue, animEndValue);
12 METHOD(
Animation, update,
void(
entity this,
float animDuration,
float animStartValue,
float animEndValue))
14 this.setTimeStartDuration(
this,
time, animDuration);
15 this.setValueStartEnd(
this, animStartValue, animEndValue);
21 this.duration = e - s;
44 if (this.isStopped(
this) || this.isFinished(
this) || (tickTime < this.startTime))
return;
46 if (tickTime >= (this.startTime + this.duration)) this.finishAnim(
this);
47 else this.value = this.calcValue(
this, (tickTime - this.startTime), this.duration, this.startValue, this.delta);
49 this.setter(this.
object, this.value);
52 METHOD(
Animation, calcValue,
float(
entity this,
float tickTime,
float animDuration,
float animStartValue,
float animDelta))
54 return animStartValue;
79 this.value = this.delta + this.startValue;
81 this.setter(this.
object, this.value);
#define METHOD(cname, name, prototype)