Ignore:
Timestamp:
09/07/13 12:26:28 (8 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Phase:
public
Message:

Replace menu and death screen with the starting level

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/engine.py

    r399 r437  
    55
    66from nagslang import constants
    7 from nagslang.screens.menu import MenuScreen
    87from nagslang.screens.area import AreaScreen
    9 from nagslang.screens.playerdied import PlayerDiedScreen
    108from nagslang.events import ScreenChange
    119from nagslang.world import World
     10from nagslang.level import Level
    1211
    1312
     
    2019        self._world = World()
    2120        self._current_screen = None
    22         self._screens = {
    23             'menu': MenuScreen,
    24             'dead': PlayerDiedScreen,
    25         }
     21
     22        self._screens = {}
    2623        for area_name in AreaScreen.list_areas():
    2724            self._screens[area_name] = AreaScreen
     25        starting_area = Level.game_starting_point()[0]
     26
    2827        self._world.load()
    29         self.change_screen('menu')
     28        self.change_screen(starting_area)
    3029        # Dummy resize event, to force us to realise our real size
    3130        # http://stackoverflow.com/q/16442573/8629
Note: See TracChangeset for help on using the changeset viewer.