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, finishAllAnim, void(entity))
7 METHOD(AnimHost, tickAll, void(entity))
8 ATTRIB(AnimHost, firstChild, entity, NULL)
9 ATTRIB(AnimHost, lastChild, entity, NULL)
16 void addAnimAnimHost(entity me, entity other)
19 error("Can't add already added anim!");
21 if(other.isFinished(other))
22 error("Can't add finished anim!");
31 l.nextSibling = other;
33 me.firstChild = other;
35 other.prevSibling = l;
36 other.nextSibling = NULL;
40 void removeAnimAnimHost(entity me, entity other)
42 if(other.parent != me)
43 error("Can't remove from wrong AnimHost!");
50 n = other.nextSibling;
51 p = other.prevSibling;
64 void stopAllAnimAnimHost(entity me)
67 for(e = me.firstChild; e; e = e.nextSibling)
74 void finishAllAnimAnimHost(entity me)
77 for(e = me.firstChild; e; e = e.nextSibling)
84 void tickAllAnimHost(entity me)
87 for(e = me.firstChild; e; e = e.nextSibling)
91 for(e = me.firstChild; e; e = e.nextSibling)
98 me.removeAnim(me, tmp);