Changeset 399:488ab520408c


Ignore:
Timestamp:
04/09/11 14:41:38 (12 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
62356262663931366561393164623539653932663931353439383431336136323339353039383466
Message:

Collide with floors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/sprites/base.py

    r380 r399  
    230230        Monster.collided(self, other)
    231231        # Check if the object we've collided with is the same height our higher than us
    232         if other.block and other.collide_rect.bottom <= self.collide_rect.bottom:
     232        if (other.block or other.floor) and other.collide_rect.bottom <= self.collide_rect.bottom:
    233233            # Change direction
    234234            if self.facing == 'left':
    235235                self.facing = 'right'
     236                self._update_image(True)
    236237            else:
    237238                self.facing = 'left'
     239                self._update_image(True)
    238240
    239241
Note: See TracChangeset for help on using the changeset viewer.