comparison demos/shooter/run.py @ 464:be035dff788a

Added high score window. Added the ability to save high scores.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 13 Apr 2010 19:43:31 +0000
parents e686b82d93d0
children 4e58dab2fcdc
comparison
equal deleted inserted replaced
463:ac0f62a07a3e 464:be035dff788a
71 71
72 self.world = world.World(self, self.engine) 72 self.world = world.World(self, self.engine)
73 self.listener = ApplicationListener(self.engine, self.world) 73 self.listener = ApplicationListener(self.engine, self.world)
74 74
75 def requestQuit(self): 75 def requestQuit(self):
76 self.breakRequested = True 76 cmd = fife.Command()
77 cmd.setSource(None)
78 cmd.setCommandType(fife.CMD_QUIT_GAME)
79 self.engine.getEventManager().dispatchCommand(cmd)
77 80
78 def loadSettings(self): 81 def loadSettings(self):
79 """ 82 """
80 Load the settings from a python file and load them into the engine. 83 Load the settings from a python file and load them into the engine.
81 Called in the ApplicationBase constructor. 84 Called in the ApplicationBase constructor.
82 """ 85 """
83 86
84 engineSetting = self.engine.getSettings() 87 engineSetting = self.engine.getSettings()
85 engineSetting.setDefaultFontGlyphs(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\"") 88 engineSetting.setDefaultFontGlyphs(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\"")
86 engineSetting.setDefaultFontPath("fonts/FreeSans.ttf") 89 engineSetting.setDefaultFontPath("fonts/FreeSans.ttf")
87 engineSetting.setDefaultFontSize(12) 90 engineSetting.setDefaultFontSize(16)
88 engineSetting.setBitsPerPixel(16) 91 engineSetting.setBitsPerPixel(16)
89 engineSetting.setScreenWidth(1024) 92 engineSetting.setScreenWidth(1024)
90 engineSetting.setScreenHeight(768) 93 engineSetting.setScreenHeight(768)
91 engineSetting.setRenderBackend("OpenGL") 94 engineSetting.setRenderBackend("OpenGL")
92 engineSetting.setFullScreen(0) 95 engineSetting.setFullScreen(0)