Mercurial > skaapsteker
comparison skaapsteker/sprites/player.py @ 115:b73724bb93f8
Fix fox facing
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Mon, 04 Apr 2011 21:45:59 +0200 |
parents | a76b8c49f1f9 |
children | 69a97094417a |
comparison
equal
deleted
inserted
replaced
114:f7d9464ed075 | 115:b73724bb93f8 |
---|---|
42 self.starting_tile_pos = pos | 42 self.starting_tile_pos = pos |
43 self.rect = self.image.get_rect(topleft=(pos[0]*TILE_SIZE[0], pos[1]*TILE_SIZE[1])) | 43 self.rect = self.image.get_rect(topleft=(pos[0]*TILE_SIZE[0], pos[1]*TILE_SIZE[1])) |
44 self.rect.inflate_ip(-10, -10) | 44 self.rect.inflate_ip(-10, -10) |
45 | 45 |
46 def action_left(self): | 46 def action_left(self): |
47 if self.facing != 'left': | |
48 self.facing = 'left' | |
49 self.set_image() | |
47 self.deltav((-100.0, 0.0)) | 50 self.deltav((-100.0, 0.0)) |
48 | 51 |
49 def action_right(self): | 52 def action_right(self): |
53 if self.facing != 'right': | |
54 self.facing = 'right' | |
55 self.set_image() | |
50 self.deltav((100.0, 0.0)) | 56 self.deltav((100.0, 0.0)) |
51 | 57 |
52 def action_up(self): | 58 def action_up(self): |
53 self.deltav((0.0, -100.0)) | 59 self.deltav((0.0, -100.0)) |
54 | 60 |