comparison components/container.py @ 15:9ffcb493a0f4

Changes for the container system
author KarstenBock@gmx.net
date Sun, 31 Jul 2011 23:48:54 +0200
parents 9c7a96c6fe41
children 16c959864d41
comparison
equal deleted inserted replaced
14:a9019d0ac5f8 15:9ffcb493a0f4
18 Component that allows an entity to contain one or more child entities. 18 Component that allows an entity to contain one or more child entities.
19 """ 19 """
20 20
21 def __init__(self): 21 def __init__(self):
22 Component.__init__(children=list, max_bulk=int) 22 Component.__init__(children=list, max_bulk=int)
23
24 def get_bulk(container):
25 bulk = 0
26 for child in container.children:
27 bulk += child.bulk
28 return bulk