Mercurial > boomslang
comparison pyntnclick/main.py @ 612:cfc16ded7b34 pyntnclick
Fix scene/screen confusion
author | Neil Muller <neil@dip.sun.ac.za> |
---|---|
date | Sat, 11 Feb 2012 21:12:45 +0200 |
parents | a25cd1c6335a |
children | 44d4e3020874 |
comparison
equal
deleted
inserted
replaced
611:4fcc389f4d40 | 612:cfc16ded7b34 |
---|---|
68 def initial_state(self): | 68 def initial_state(self): |
69 """Create a copy of the initial game state.""" | 69 """Create a copy of the initial game state.""" |
70 initial_state = state.Game(self) | 70 initial_state = state.Game(self) |
71 initial_state.set_debug_rects(self._debug_rects) | 71 initial_state.set_debug_rects(self._debug_rects) |
72 for scene in self._scene_list: | 72 for scene in self._scene_list: |
73 initial_state.load_scenes(scene, self.engine) | 73 initial_state.load_scenes(scene) |
74 initial_state.set_current_scene(self._initial_scene) | 74 initial_state.set_current_scene(self._initial_scene) |
75 initial_state.set_do_enter_leave() | 75 initial_state.set_do_enter_leave() |
76 return initial_state | 76 return initial_state |
77 | 77 |
78 def game_constants(self): | 78 def game_constants(self): |
151 'suspended_sentence24x24.png', basedir='icons')) | 151 'suspended_sentence24x24.png', basedir='icons')) |
152 pygame.display.set_caption("Suspended Sentence") | 152 pygame.display.set_caption("Suspended Sentence") |
153 | 153 |
154 self.engine = Engine(self) | 154 self.engine = Engine(self) |
155 # Initialize the special screens in the engine | 155 # Initialize the special screens in the engine |
156 for name, cls in self.SPECIAL_SCENES.iteritems(): | 156 for name, cls in self.SPECIAL_SCREENS.iteritems(): |
157 screen = cls(self) | 157 screen = cls(self) |
158 self.engine.add_screen(name, screen) | 158 self.engine.add_screen(name, screen) |
159 # Should we allow the menu not to be the opening screen? | 159 # Should we allow the menu not to be the opening screen? |
160 self.engine.set_screen(self.START_SCREEN) | 160 self.engine.set_screen(self.START_SCREEN) |
161 try: | 161 try: |