comparison pytouhou/game/orb.py @ 304:f3099ebf4f61

Update attribute names to reflect the actual interface.
author Thibaut Girka <thib@sitedethib.com>
date Tue, 13 Mar 2012 18:38:14 +0100
parents 300661f2ae8a
children c9433188ffdb
comparison
equal deleted inserted replaced
303:647bde10353d 304:f3099ebf4f61
16 from pytouhou.game.sprite import Sprite 16 from pytouhou.game.sprite import Sprite
17 from pytouhou.vm.anmrunner import ANMRunner 17 from pytouhou.vm.anmrunner import ANMRunner
18 18
19 19
20 class Orb(object): 20 class Orb(object):
21 __slots__ = ('_sprite', '_anmrunner', 'offset_x', 'offset_y', 'player_state', 21 __slots__ = ('sprite', 'anmrunner', 'offset_x', 'offset_y', 'player_state',
22 'fire') 22 'fire')
23 23
24 def __init__(self, anm_wrapper, index, player_state, fire_func): 24 def __init__(self, anm_wrapper, index, player_state, fire_func):
25 self._sprite = Sprite() 25 self.sprite = Sprite()
26 self._anmrunner = ANMRunner(anm_wrapper, index, self._sprite) 26 self.anmrunner = ANMRunner(anm_wrapper, index, self.sprite)
27 self._anmrunner.run_frame() 27 self.anmrunner.run_frame()
28 28
29 self.offset_x = 0 29 self.offset_x = 0
30 self.offset_y = 0 30 self.offset_y = 0
31 31
32 self.player_state = player_state 32 self.player_state = player_state
42 def y(self): 42 def y(self):
43 return self.player_state.y + self.offset_y 43 return self.player_state.y + self.offset_y
44 44
45 45
46 def update(self): 46 def update(self):
47 self._anmrunner.run_frame() 47 self.anmrunner.run_frame()
48