comparison pytouhou/game/effect.py @ 430:c9433188ffdb

Remove AnmWrapper, since ANMs are lists of entries now.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 03 Aug 2013 15:49:04 +0200
parents ac2891afb0bb
children 1222341ea22c
comparison
equal deleted inserted replaced
429:40d5f3083ebc 430:c9433188ffdb
18 from pytouhou.utils.interpolator import Interpolator 18 from pytouhou.utils.interpolator import Interpolator
19 19
20 20
21 21
22 class Effect(object): 22 class Effect(object):
23 def __init__(self, pos, index, anm_wrapper): 23 def __init__(self, pos, index, anm):
24 self.sprite = Sprite() 24 self.sprite = Sprite()
25 self.anmrunner = ANMRunner(anm_wrapper, index, self.sprite) 25 self.anmrunner = ANMRunner(anm, index, self.sprite)
26 self.anmrunner.run_frame() 26 self.anmrunner.run_frame()
27 self.removed = False 27 self.removed = False
28 self.objects = [self] 28 self.objects = [self]
29 29
30 self.x, self.y = pos 30 self.x, self.y = pos
40 self.removed = True 40 self.removed = True
41 41
42 42
43 43
44 class Particle(Effect): 44 class Particle(Effect):
45 def __init__(self, pos, index, anm_wrapper, amp, game, reverse=False, duration=24): 45 def __init__(self, pos, index, anm, amp, game, reverse=False, duration=24):
46 Effect.__init__(self, pos, index, anm_wrapper) 46 Effect.__init__(self, pos, index, anm)
47 47
48 self.frame = 0 48 self.frame = 0
49 self.duration = duration 49 self.duration = duration
50 50
51 random_pos = (self.x + amp * game.prng.rand_double() - amp / 2, 51 random_pos = (self.x + amp * game.prng.rand_double() - amp / 2,