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