comparison pytouhou/game/item.py @ 208:d07506a2e16e

Implement autocollection of items.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 08 Nov 2011 22:10:44 -0800
parents 13918723d1bc
children 0595315d3880
comparison
equal deleted inserted replaced
207:709f42eaa55e 208:d07506a2e16e
47 else: 47 else:
48 self.speed_interpolator = Interpolator((-2.,), 0, 48 self.speed_interpolator = Interpolator((-2.,), 0,
49 (0.,), 60) 49 (0.,), 60)
50 50
51 self._sprite.angle = angle 51 self._sprite.angle = angle
52
53
54 def autocollect(self, player):
55 self.player = player
56 self.speed = 8.
52 57
53 58
54 def on_collect(self, player_state): 59 def on_collect(self, player_state):
55 old_power = player_state.power 60 old_power = player_state.power
56 61