Changeset 656:2d408092bbae for nagslang


Ignore:
Timestamp:
Sep 8, 2013, 2:33:55 AM (7 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
bugfixes
Message:

Cleanup collision handlers when we're done with the space

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r650 r656  
    102102    def teardown(self):
    103103        sound.stop()
     104        for collision_type in CALLBACK_COLLIDERS:
     105            self.space.remove_collision_handler(
     106                COLLISION_TYPE_PLAYER, collision_type)
     107            self.space.remove_collision_handler(
     108                COLLISION_TYPE_FURNITURE, collision_type)
     109            self.space.remove_collision_handler(
     110                COLLISION_TYPE_WEREWOLF_ATTACK, collision_type)
    104111
    105112    @classmethod
Note: See TracChangeset for help on using the changeset viewer.