comparison demos/shooter/scripts/world.py @ 496:987307d12235

Added the fife_settings.py extension. This provides a small utility class for loading and saving settings along with a dialog box for setting screen resolution and other things. Updated the shooter demo and rio_de_hola to use the new settings extension.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 12 May 2010 16:09:46 +0000
parents ae9f5383f5b1
children 96c4922c1c24
comparison
equal deleted inserted replaced
495:ae9f5383f5b1 496:987307d12235
46 loading the map 46 loading the map
47 handles mouse/key events which aren't handled by the GUI. 47 handles mouse/key events which aren't handled by the GUI.
48 ( by inheriting from EventlistenerBase ) 48 ( by inheriting from EventlistenerBase )
49 49
50 """ 50 """
51 def __init__(self, app, engine): 51 def __init__(self, app, engine, setting):
52 super(World, self).__init__(engine, regKeys=True) 52 super(World, self).__init__(engine, regKeys=True)
53 53
54 self._applictaion = app 54 self._applictaion = app
55 self._engine = engine 55 self._engine = engine
56 self._setting = setting
56 self._timemanager = engine.getTimeManager() 57 self._timemanager = engine.getTimeManager()
57 self._eventmanager = engine.getEventManager() 58 self._eventmanager = engine.getEventManager()
58 self._model = engine.getModel() 59 self._model = engine.getModel()
59 self._filename = '' 60 self._filename = ''
60 self._keystate = { 'UP': False, 61 self._keystate = { 'UP': False,
70 self._pausedtime = 0 71 self._pausedtime = 0
71 self._starttime = 0 72 self._starttime = 0
72 73
73 self._soundmanager = SoundManager(self._engine) 74 self._soundmanager = SoundManager(self._engine)
74 75
75 self._mainmenu = MainMenu(self) 76 self._mainmenu = MainMenu(self, self._setting)
76 self.showMainMenu() 77 self.showMainMenu()
77 78
78 self._hudwindow = HeadsUpDisplay(self) 79 self._hudwindow = HeadsUpDisplay(self)
79 self._hudwindow.hide() 80 self._hudwindow.hide()
80 81