Pārlūkot izejas kodu

Allow recursive Object.stopAnimation

trethaller 7 gadi atpakaļ
vecāks
revīzija
c01d2d1bd3
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5 1
      h3d/scene/Object.hx

+ 5 - 1
h3d/scene/Object.hx

@@ -145,8 +145,12 @@ class Object implements hxd.impl.Serializable {
 		return currentAnimation = a;
 	}
 
-	public function stopAnimation() {
+	public function stopAnimation( ?recursive = false ) {
 		currentAnimation = null;
+		if(recursive) {
+			for(c in children)
+				c.stopAnimation(true);
+		}
 	}
 
 	/**