diff 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
line wrap: on
line diff
--- a/demos/shooter/run.py	Mon Apr 12 20:41:24 2010 +0000
+++ b/demos/shooter/run.py	Tue Apr 13 19:43:31 2010 +0000
@@ -73,7 +73,10 @@
 		self.listener = ApplicationListener(self.engine, self.world)
 
 	def requestQuit(self):
-		self.breakRequested = True
+		cmd = fife.Command()
+		cmd.setSource(None)
+		cmd.setCommandType(fife.CMD_QUIT_GAME)
+		self.engine.getEventManager().dispatchCommand(cmd)
 		
 	def loadSettings(self):
 		"""
@@ -84,7 +87,7 @@
 		engineSetting = self.engine.getSettings()
 		engineSetting.setDefaultFontGlyphs(" abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]\"")
 		engineSetting.setDefaultFontPath("fonts/FreeSans.ttf")
-		engineSetting.setDefaultFontSize(12)
+		engineSetting.setDefaultFontSize(16)
 		engineSetting.setBitsPerPixel(16)
 		engineSetting.setScreenWidth(1024)
 		engineSetting.setScreenHeight(768)