2 CLASS(AnimHost) EXTENDS(Object)
3 METHOD(AnimHost, addAnim, void(entity, entity))
4 METHOD(AnimHost, removeAnim, void(entity, entity))
5 METHOD(AnimHost, stopAllAnim, void(entity))
6 METHOD(AnimHost, stopObjAnim, void(entity, entity))
7 METHOD(AnimHost, finishAllAnim, void(entity))
8 METHOD(AnimHost, finishObjAnim, void(entity, entity))
9 METHOD(AnimHost, tickAll, void(entity))
10 ATTRIB(AnimHost, firstChild, entity, NULL)
11 ATTRIB(AnimHost, lastChild, entity, NULL)
18 void addAnimAnimHost(entity me, entity other)
21 error("Can't add already added anim!");
23 if(other.isFinished(other))
24 error("Can't add finished anim!");
33 l.nextSibling = other;
35 me.firstChild = other;
37 other.prevSibling = l;
38 other.nextSibling = NULL;
42 void removeAnimAnimHost(entity me, entity other)
44 if(other.parent != me)
45 error("Can't remove from wrong AnimHost!");
52 n = other.nextSibling;
53 p = other.prevSibling;
66 void stopAllAnimAnimHost(entity me)
69 for(e = me.firstChild; e; e = e.nextSibling)
75 void stopObjAnimAnimHost(entity me, entity obj)
78 for(e = me.firstChild; e; e = e.nextSibling)
87 void finishAllAnimAnimHost(entity me)
90 for(e = me.firstChild; e; e = e.nextSibling)
94 me.removeAnim(me, tmp);
99 void finishObjAnimAnimHost(entity me, entity obj)
102 for(e = me.firstChild; e; e = e.nextSibling)
108 me.removeAnim(me, tmp);
114 void tickAllAnimHost(entity me)
117 for(e = me.firstChild; e; e = e.nextSibling)
121 for(e = me.firstChild; e; e = e.nextSibling)
127 me.removeAnim(me, tmp);