Selaa lähdekoodia

Allow recursive Object.stopAnimation

trethaller 7 vuotta sitten
vanhempi
commit
c01d2d1bd3
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  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);
+		}
 	}
 
 	/**