Пример #1
0
 def post_update(self):
     if not get_camera().ptInRect(self.form.pos):
         game_world.remove_object(self)
     elif game_world.now_map.fly_over_tiles(self):
         game_world.remove_object(self)
     for enemy in game_world.get_all_enemies():
         if collide(enemy, self):
             enemy.damaged(self.damage_value)
Пример #2
0
 def apply(item):
     for mob in game_world.get_all_enemies():
         if collide(item, mob):
             mob.damaged(MasterSword.atk)