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
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)
def __init__(self, entity, parent): Component.__init__(self, entity) self.parent = parent
def __init__(self, entity): Component.__init__(self, entity) self.parts = []
def __init__(self, entity): Component.__init__(self, entity) self._research = 0
def __init__(self, entity): Component.__init__(self, entity) # List of orders self.commands = []
def __init__(self, entity): Component.__init__(self, entity) self.enemies = [] self.closest = None self.closestDistance = float("inf")
def __init__(self, entity): Component.__init__(self, entity) self._p = Vector2()
def __init__(self, entity): Component.__init__(self, entity) self.reloadTimeLeft = 0 self.shootTimeLeft = 0 self.target = None # To be updated by an awareness component
def __init__(self, entity): Component.__init__(self, entity) self.x = None self.y = None
def init(self, XMLRoot): Component.init(self, XMLRoot) self.HP = self.HPMax
def __init__(self, entity): Component.__init__(self, entity) self.HP = None self.HPMax = None
def __init__(self, entity): Component.__init__(self, entity) self.vMax = None self.vx = None self.vy = None
def __init__(self, entity): Component.__init__(self, entity) self._facingLeft = False
def __init__(self, entity): Component.__init__(self, entity) self.body = None self.equipment = {} # Maps parts to the equipment there
def __init__(self, entity): Component.__init__(self, entity) self.factionName = None self.faction = None
def __init__(self, entity): Component.__init__(self, entity) self.contents = [] self.roughness = None
def __init__(self, entity): self.vMax = None self._v = Vector2(0, 0) # Read vMax in case it exists. Component.__init__(self, entity)