comparison pytouhou/game/game.py @ 134:e9ac3640280b

Add support for enemy spawnling enemies.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Fri, 16 Sep 2011 11:21:33 -0700
parents 11ab06f4c4c6
children c7f0fd9d2145
comparison
equal deleted inserted replaced
133:2cad2e84a49e 134:e9ac3640280b
59 'stg%denm2.anm' % stage)) 59 'stg%denm2.anm' % stage))
60 ecl = resource_loader.get_ecl('ecldata%d.ecl' % stage) 60 ecl = resource_loader.get_ecl('ecldata%d.ecl' % stage)
61 self.ecl_runner = ECLMainRunner(ecl, self.new_enemy, self.game_state) 61 self.ecl_runner = ECLMainRunner(ecl, self.new_enemy, self.game_state)
62 62
63 63
64 def new_enemy(self, pos, life, instr_type): 64 def new_enemy(self, pos, life, instr_type, pop_enemy):
65 enemy = Enemy(pos, life, instr_type, self.enm_anm_wrapper, self.game_state) 65 enemy = Enemy(pos, life, instr_type, self.enm_anm_wrapper, self.game_state, pop_enemy)
66 self.enemies.append(enemy) 66 self.enemies.append(enemy)
67 return enemy 67 return enemy
68 68
69 69
70 def run_iter(self, keystate): 70 def run_iter(self, keystate):