def __init__(self, unit, maxHp, position = Coordinate(0, 0)): Runnable.__init__(self) self.image = Image('graphics/lifeBar.bmp', permeate = False) self.imageSize = self.image.getSize() self.position = Coordinate(position) self.unit = unit self.maxHp = maxHp
def __init__(self): Runnable.__init__(self) self.speed = UNIT_MAX_SPEED self.rollAngle = UNIT_MAX_ROLL_ANGLE self.moveKeys = (Manager.K_UP, Manager.K_w) self.leftRollKeys = (Manager.K_LEFT, Manager.K_a) self.rightRollKeys = (Manager.K_RIGHT, Manager.K_d) self.fireKeys = (Manager.K_SPACE, Manager.K_z, Manager.K_DOWN, Manager.K_s, Manager.K_z, Manager.K_x, Manager.K_LSHIFT, Manager.K_RSHIFT)
def end(self): for i in self.units: i.sendEndMessage() self.field.end() self.bases.end() self.units.end() self.bullets.end() self.items.end() time.sleep(3) Runnable.end(self)
def end(self): '''AiManagerの終了処理を書くところ オーバーライドする必要はない Runnableのendが呼ばれないと何かが起きるかもしれない''' Runnable.end(self)
def __init__(self): Runnable.__init__(self) self.gameManager = GameManager() self.statusViewers = [UnitStatusViewer(base, BASE_DEFAULT_HP, (700, 50 + i * 50)) for i, base in enumerate(self.gameManager.bases)] +\ [UnitStatusViewer(unit, UNIT_DEFAULT_HP, (700, 250 + i * 50)) for i, unit in enumerate(self.gameManager.units)]
def end(self): self._processController.end() Runnable.end(self)