Changeset 190:97627a999042 for nagslang
- Timestamp:
- 09/03/13 19:44:55 (9 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nagslang/screens/area.py
r188 r190 65 65 66 66 def setup(self): 67 self._disable_render = False # Avoid redrawing on scene changes 67 68 self.keys = ControlKeys() 68 69 self._level = Level(self.name) … … 127 128 if ev.destination != self.name: 128 129 # Go to anther screen 130 self._disable_render = True 129 131 ScreenChange.post(ev.destination, self.protagonist) 132 return 130 133 # else we're teleporting within the screen, and just the 131 134 # position change is enough … … 158 161 159 162 def render(self, surface): 160 #surface.fill(pygame.color.Color(0, 0, 0)) 163 if self._disable_render: 164 return 161 165 background = self._level.get_background() 162 166 mysurface = background.copy()
Note:
See TracChangeset
for help on using the changeset viewer.