Changeset 57:e545236dd8f4


Ignore:
Timestamp:
Apr 3, 2011, 7:40:30 PM (9 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Message:

Change back to plain layered updater since everything is dirty all the time. Remove collision print since collisions appear to work.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/physics.py

    r53 r57  
    5151
    5252    def __init__(self):
    53         self._all = pygame.sprite.LayeredDirty()
     53        self._all = pygame.sprite.LayeredUpdates()
    5454        self._mobiles = pygame.sprite.Group()
    5555        self._gravitators = pygame.sprite.Group()
     
    8282
    8383        # check for collisions
    84         print "-------"
    8584        for sprite1, sprites in pygame.sprite.groupcollide(self._mobiles, self._all, False, False).iteritems():
    8685            for sprite2 in sprites:
    8786                if sprite1 is sprite2:
    8887                    continue
    89                 print "Collision! %r (%s), %r (%s)" % (sprite1, id(sprite1), sprite2, id(sprite2))
    90                 print "    ", sprite1.rect, sprite2.rect
    9188
    9289    def draw(self, surface):
Note: See TracChangeset for help on using the changeset viewer.