Bläddra i källkod

Allow recursive Object.stopAnimation

trethaller 7 år sedan
förälder
incheckning
c01d2d1bd3
1 ändrade filer med 5 tillägg och 1 borttagningar
  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);
+		}
 	}
 
 	/**