Пример #1
0
 def __init__(self, position=(0, 0), size=(0, 0), direction=Direction.down, json=None):
     CreatureSprite.__init__(self, PLAYER_IMAGE, position, size, direction)
     if json:
         self.inventory = {}
         self.final_inventory = []
         self.from_json(json)
     else:
         self.lives = self.std_lives
         self.health = self.std_health
         self.inventory = {MagicShoes : 2, Item : 1, Potion : 2, Crystal : 3}
         self.final_inventory = []
         self.count = 0
         self.bullets = 1
         self.weapon_tier = 0
     self.fire_sound = pymix.Sound(LASER)
     self.laser = 1
Пример #2
0
 def __init__(self, position=(0, 0), size=(0, 0), direction=Direction.down, json=None):
     CreatureSprite.__init__(self, ENEMY_IMAGE, position, size, direction)
     if json:
         self.from_json(json)
     else:
         self.health = 3