소스 검색

Allow recursive Object.stopAnimation

trethaller 7 년 전
부모
커밋
c01d2d1bd3
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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);
+		}
 	}
 
 	/**