Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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)]