Mercurial > touhou
diff pytouhou/game/game.py @ 173:35d850502d1f
Move effects where they should be.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Fri, 21 Oct 2011 09:37:23 -0700 |
parents | ea2ad94c33a0 |
children | 80a4c7ed43b3 |
line wrap: on
line diff
--- a/pytouhou/game/game.py +++ b/pytouhou/game/game.py @@ -20,6 +20,7 @@ from pytouhou.vm.eclrunner import ECLMai from pytouhou.game.player import Player from pytouhou.game.enemy import Enemy from pytouhou.game.item import Item +from pytouhou.game.effect import Effect @@ -50,6 +51,7 @@ class Game(object): self.enm_anm_wrapper = resource_loader.get_anm_wrapper2(('stg%denm.anm' % stage, 'stg%denm2.anm' % stage)) + self.eff00 = resource_loader.get_anm_wrapper(('eff00.anm',)) ecl = resource_loader.get_ecl('ecldata%d.ecl' % stage) self.ecl_runner = ECLMainRunner(ecl, self) @@ -70,6 +72,10 @@ class Game(object): self.bullets = [] + def new_effect(self, pos, anim): + self.effects.append(Effect(pos, anim, self.eff00)) + + def new_enemy(self, pos, life, instr_type, bonus_dropped, die_score): enemy = Enemy(pos, life, instr_type, bonus_dropped, die_score, self.enm_anm_wrapper, self) self.enemies.append(enemy)