Example #1
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.range = 0 # Range from which things can be harvested
   self.rate = 0 # Speed at which things are harvested
   self._load = 0 # Load carried right now
   self.capacity = 0 # Maximum load
   self.target = None # harvest target
   self.base = None # place to return stuff to.
   
   self._harvesting = False # Whether harvesting atm or not
Example #2
0
 def __init__(self, entity):
   self.p = Vector2(0, 0)
   self.v = Vector2(0, 0)
   self.a = Vector2(0, 0)
   self.damping = 1.0
   self.r = 0
   self.rV = 0
   self.rA = 0
   self.rDamping = 1
   Component.__init__(self, entity)
Example #3
0
 def __init__(self, entity, parent):
   Component.__init__(self, entity)
   self.parent = parent
Example #4
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.parts = []
Example #5
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self._research = 0
Example #6
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   # List of orders
   self.commands = []
Example #7
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.enemies = []
   self.closest = None
   self.closestDistance = float("inf")
Example #8
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self._p = Vector2()
Example #9
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.reloadTimeLeft = 0
   self.shootTimeLeft = 0
   self.target = None # To be updated by an awareness component
Example #10
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.x = None
   self.y = None
Example #11
0
 def init(self, XMLRoot):
   Component.init(self, XMLRoot)
   self.HP = self.HPMax
Example #12
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.HP = None
   self.HPMax = None
Example #13
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.vMax = None    
   self.vx = None
   self.vy = None
Example #14
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self._facingLeft = False
Example #15
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.body = None
   self.equipment = {} # Maps parts to the equipment there 
Example #16
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.factionName = None
   self.faction = None
Example #17
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.contents = []
   self.roughness = None
Example #18
0
 def __init__(self, entity):
   self.vMax = None
   self._v = Vector2(0, 0)
   
   # Read vMax in case it exists.
   Component.__init__(self, entity)