comparison pytouhou/game/item.pyx @ 468:feecdb4a8928

Add “except *” to cdef void functions, and type some more.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 12 Sep 2013 15:47:08 +0200
parents 78e1c3864e73
children 8038f1957b71
comparison
equal deleted inserted replaced
467:5bb7d2c0ff46 468:feecdb4a8928
24 24
25 self.x = self._item.x 25 self.x = self._item.x
26 self.y = self.sprite.texcoords[2] / 2. 26 self.y = self.sprite.texcoords[2] / 2.
27 27
28 28
29 cpdef update(self): 29 cdef void update(self) nogil:
30 #TODO: alpha 30 #TODO: alpha
31 self.x = self._item.x 31 self.x = self._item.x
32 32
33 33
34 34
67 if self.indicator is not None: 67 if self.indicator is not None:
68 return [self.indicator] 68 return [self.indicator]
69 return [self] 69 return [self]
70 70
71 71
72 cpdef autocollect(self, Player player): 72 cdef void autocollect(self, Player player):
73 if self.player is None: 73 if self.player is None:
74 self.player = player 74 self.player = player
75 self.speed = player.sht.autocollection_speed 75 self.speed = player.sht.autocollection_speed
76 76
77 77
78 cpdef on_collect(self, Player player): 78 cdef void on_collect(self, Player player):
79 cdef long level, poc 79 cdef long level, poc
80 80
81 player_state = player.state 81 player_state = player.state
82 old_power = player_state.power 82 old_power = player_state.power
83 score = 0 83 score = 0