浏览代码

Added Children, NumChildren properties to entity.

Mark Sibly 8 年之前
父节点
当前提交
1507133522
共有 1 个文件被更改,包括 14 次插入0 次删除
  1. 14 0
      modules/mojo3d/graphics/entity.monkey2

+ 14 - 0
modules/mojo3d/graphics/entity.monkey2

@@ -115,6 +115,20 @@ Class Entity
 		Invalidate()
 	End
 	
+	#rem monkeydoc Number of child entities.
+	#end
+	Property NumChildren:Int()
+		
+		Return _children.Length
+	End
+	
+	#rem monkeydoc Array of child entities.
+	#end
+	Property Children:Entity[]()
+		
+		Return _children.ToArray()
+	End
+
 	#rem monkeydoc entity visibility flag.
 	#end
 	Property Visible:Bool()