Beispiel #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
Beispiel #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)
Beispiel #3
0
 def __init__(self, entity, parent):
   Component.__init__(self, entity)
   self.parent = parent
Beispiel #4
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.parts = []
Beispiel #5
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self._research = 0
Beispiel #6
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   # List of orders
   self.commands = []
Beispiel #7
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.enemies = []
   self.closest = None
   self.closestDistance = float("inf")
Beispiel #8
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self._p = Vector2()
Beispiel #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
Beispiel #10
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.x = None
   self.y = None
Beispiel #11
0
 def init(self, XMLRoot):
   Component.init(self, XMLRoot)
   self.HP = self.HPMax
Beispiel #12
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.HP = None
   self.HPMax = None
Beispiel #13
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.vMax = None    
   self.vx = None
   self.vy = None
Beispiel #14
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self._facingLeft = False
Beispiel #15
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.body = None
   self.equipment = {} # Maps parts to the equipment there 
Beispiel #16
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.factionName = None
   self.faction = None
Beispiel #17
0
 def __init__(self, entity):
   Component.__init__(self, entity)
   self.contents = []
   self.roughness = None
Beispiel #18
0
 def __init__(self, entity):
   self.vMax = None
   self._v = Vector2(0, 0)
   
   # Read vMax in case it exists.
   Component.__init__(self, entity)