Browse Source

Added Children, NumChildren properties to entity.

Mark Sibly 8 năm trước cách đây
mục cha
commit
1507133522
1 tập tin đã thay đổi với 14 bổ sung0 xóa
  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()