Procházet zdrojové kódy

Allow recursive Object.stopAnimation

trethaller před 7 roky
rodič
revize
c01d2d1bd3
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  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;
 		return currentAnimation = a;
 	}
 	}
 
 
-	public function stopAnimation() {
+	public function stopAnimation( ?recursive = false ) {
 		currentAnimation = null;
 		currentAnimation = null;
+		if(recursive) {
+			for(c in children)
+				c.stopAnimation(true);
+		}
 	}
 	}
 
 
 	/**
 	/**