comparison skaapsteker/sprites/player.py @ 272:630ebb87b38a

Remove debugging print
author Neil Muller <drnlmuller@gmail.com>
date Fri, 08 Apr 2011 17:32:50 +0200
parents 56a529a69e97
children 95e2ef31e714
comparison
equal deleted inserted replaced
271:56a529a69e97 272:630ebb87b38a
161 self._last_collide.append(other) 161 self._last_collide.append(other)
162 self._collide_pos = self.collide_rect.midbottom 162 self._collide_pos = self.collide_rect.midbottom
163 self._collisions_seen = 0 163 self._collisions_seen = 0
164 elif other in self._last_collide: 164 elif other in self._last_collide:
165 self._collisions_seen += 1 165 self._collisions_seen += 1
166 print other, self._collisions_seen, self._last_collide
167 if hasattr(other, 'collided_player'): 166 if hasattr(other, 'collided_player'):
168 other.collided_player(self) 167 other.collided_player(self)
169 print 'Health', self.the_world.fox.cur_health 168 print 'Health', self.the_world.fox.cur_health
170 169
171 170
179 """Restore player to max health (for restarting levels, etc.)""" 178 """Restore player to max health (for restarting levels, etc.)"""
180 self.the_world.fox.cur_health = self.the_world.fox.max_health 179 self.the_world.fox.cur_health = self.the_world.fox.max_health
181 180
182 def set_pos(self, pos): 181 def set_pos(self, pos):
183 self.rect.midbottom = pos[0] * TILE_SIZE[0] + self.rect_offset[0], (pos[1] + 1) * TILE_SIZE[1] + self.rect_offset[1] 182 self.rect.midbottom = pos[0] * TILE_SIZE[0] + self.rect_offset[0], (pos[1] + 1) * TILE_SIZE[1] + self.rect_offset[1]
184 self.collide_rect.midbottom = pos[0] * TILE_SIZE[0], pos[1] * TILE_SIZE[1] 183 self.collide_rect.midbottom = pos[0] * TILE_SIZE[0], (pos[1] + 1) * TILE_SIZE[1]
185 184
186 def action_left(self): 185 def action_left(self):
187 if self.facing != 'left': 186 if self.facing != 'left':
188 self.facing = 'left' 187 self.facing = 'left'
189 self.set_image() 188 self.set_image()