comparison pytouhou/game/orb.py @ 494:6be9c99a3a24

Merge PlayerState into Player, fix player respawn position.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 14 Oct 2013 12:11:01 +0200
parents 06f0eeb519bb
children e35bef07290d
comparison
equal deleted inserted replaced
493:26c082870dcf 494:6be9c99a3a24
14 14
15 from pytouhou.vm.anmrunner import ANMRunner 15 from pytouhou.vm.anmrunner import ANMRunner
16 16
17 17
18 class Orb(Element): 18 class Orb(Element):
19 def __init__(self, anm, index, player_state): 19 def __init__(self, anm, index, player):
20 Element.__init__(self) 20 Element.__init__(self)
21 21
22 self.sprite = Sprite() 22 self.sprite = Sprite()
23 self.anmrunner = ANMRunner(anm, index, self.sprite) 23 self.anmrunner = ANMRunner(anm, index, self.sprite)
24 24
25 self.offset_x = 0 25 self.offset_x = 0
26 self.offset_y = 0 26 self.offset_y = 0
27 27
28 self.player_state = player_state 28 self.player = player
29 29
30 30
31 def update(self): 31 def update(self):
32 self.anmrunner.run_frame() 32 self.anmrunner.run_frame()
33 self.x = self.player_state.x + self.offset_x 33 self.x = self.player.x + self.offset_x
34 self.y = self.player_state.y + self.offset_y 34 self.y = self.player.y + self.offset_y