Changeset 170:aa154c4086cb


Ignore:
Timestamp:
Apr 5, 2011, 10:49:16 PM (9 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Message:

Replace scene .freeze and .thaw methods with .enter and .leave.

Location:
skaapsteker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/levelscene.py

    r169 r170  
    2424        self._clip_rect = None
    2525        self._world = physics.World()
    26         self.frozen = False
    2726
    2827        # hackity, hack, hack
     
    6160    def _quit(self):
    6261        import menuscene # avoid circular import
    63         self.freeze()
    6462        engine.ChangeScene.post(menuscene.MenuScene(self.game_state, self))
    6563
    66     def freeze(self):
     64    def leave(self):
    6765        """Freeze the scene, for serialization"""
    68         self.frozen = True
    6966        self._world.freeze()
    7067
    71     def thaw(self):
     68    def enter(self):
    7269        """Unfreeze"""
    7370        self._world.thaw()
    74         self.frozen = False
    7571
    7672    def draw(self, screen_surface, engine):
  • skaapsteker/menuscene.py

    r165 r170  
    3232            ChangeScene.post(LevelScene(self.game_state, data))
    3333        elif data == 'resume':
    34             self.cur_game.thaw()
    3534            ChangeScene.post(self.cur_game)
    3635        elif data == 'cutscene':
Note: See TracChangeset for help on using the changeset viewer.