Changeset 401:55e00f186c6f


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

imported patch floor_checks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/physics.py

    r273 r401  
    9999
    100100    def collided(self, other):
     101        pass
     102
     103    def check_floors(self, floors):
     104        """Trigger of the current set of floors"""
    101105        pass
    102106
     
    276280                    (sprite.collide_rect.width, 1))
    277281            collides = contact_rect.colliderect
     282            floors = []
    278283            if sprite.on_solid:
    279284                # Check if we are still in contact with the ground
     
    282287                    if (other.floor or other.block) and collides(other.floor_rect):
    283288                        still_on_solid = True
    284                         break
     289                        floors.append(other)
    285290                sprite.on_solid = still_on_solid
    286291            else:
     
    289294                    if (other.floor or other.block) and collides(other.floor_rect):
    290295                        sprite.on_solid = True
    291                         break
     296                        floors.append(other)
     297            sprite.check_floors(floors)
    292298
    293299        # call update methods
Note: See TracChangeset for help on using the changeset viewer.