2 CLASS(Animation) EXTENDS(Object)
3 METHOD(Animation, configureAnimation, void(entity, entity, void(entity, float), float, float, float, float))
4 METHOD(Animation, setTimeStartEnd, void(entity, float, float))
5 METHOD(Animation, setTimeStartDuration, void(entity, float, float))
6 METHOD(Animation, setValueStartEnd, void(entity, float, float))
7 METHOD(Animation, setValueStartDelta, void(entity, float, float))
8 METHOD(Animation, setObjectSetter, void(entity, entity, void(entity, float)))
9 METHOD(Animation, tick, void(entity, float))
10 METHOD(Animation, calcValue, float(entity, float, float, float, float))
11 METHOD(Animation, isStopped, float(entity))
12 METHOD(Animation, stopAnim, void(entity))
13 METHOD(Animation, resumeAnim, void(entity))
14 METHOD(Animation, isFinished, float(entity))
15 METHOD(Animation, finishAnim, void(entity))
16 ATTRIB(Animation, object, entity, NULL)
17 ATTRIB(Animation, setter, void(entity, float), setterDummy)
18 ATTRIB(Animation, value, float, 0)
19 ATTRIB(Animation, startTime, float, 0)
20 ATTRIB(Animation, duration, float, 0)
21 ATTRIB(Animation, startValue, float, 0)
22 ATTRIB(Animation, delta, float, 0)
23 ATTRIB(Animation, stopped, float, FALSE)
24 ATTRIB(Animation, finished, float, FALSE)
26 void setterDummy(entity, float);
30 void configureAnimationAnimation(entity me, entity obj, void(entity, float) setter, float startTime, float duration, float startValue, float end)
32 me.setObjectSetter(me, obj, setter);
33 me.setTimeStartDuration(me, startTime, duration);
34 me.setValueStartEnd(me, startValue, end);
37 void setTimeStartEndAnimation(entity me, float s, float e)
43 void setTimeStartDurationAnimation(entity me, float s, float d)
49 void setValueStartEndAnimation(entity me, float s, float e)
55 void setValueStartDeltaAnimation(entity me, float s, float d)
61 void setObjectSetterAnimation(entity me, entity o, void(entity, float) s)
67 void tickAnimation(entity me, float time)
69 if (me.isStopped(me) || me.isFinished(me) || (time < me.startTime))
72 if (time >= (me.startTime + me.duration))
75 me.value = me.calcValue(me, (time - me.startTime), me.duration, me.startValue, me.delta);
77 me.setter(me.object, me.value);
80 float calcValueAnimation(entity me, float time, float duration, float startValue, float delta)
85 float isStoppedAnimation(entity me)
90 void stopAnimAnimation(entity me)
95 void resumeAnimAnimation(entity me)
100 float isFinishedAnimation(entity me)
105 void finishAnimAnimation(entity me)
107 me.value = me.delta + me.startValue;
111 void setterDummy(entity object, float value)