Trees | Indices | Help |
|
---|
|
1 ##################################################################### 2 # -*- coding: iso-8859-1 -*- # 3 # # 4 # Frets on Fire # 5 # Copyright (C) 2006 Sami Kyöstilä # 6 # # 7 # This program is free software; you can redistribute it and/or # 8 # modify it under the terms of the GNU General Public License # 9 # as published by the Free Software Foundation; either version 2 # 10 # of the License, or (at your option) any later version. # 11 # # 12 # This program is distributed in the hope that it will be useful, # 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of # 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # 15 # GNU General Public License for more details. # 16 # # 17 # You should have received a copy of the GNU General Public License # 18 # along with this program; if not, write to the Free Software # 19 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # 20 # MA 02110-1301, USA. # 21 ##################################################################### 22 23 from Input import KeyListener 24 from Session import MessageHandler 25 from Task import Task 26 from Language import _ 27 import MainMenu 28 import Svg 29 import Dialogs 307433 assert session.world.players, "No players in game" 34 35 self.engine = engine 36 self.session = session 37 self.time = 0.0 38 self.session.broker.addMessageHandler(self) 39 self.player = self.session.world.getLocalPlayer()4042 self.session.broker.removeMessageHandler(self) 43 self.engine.view.popAllLayers() 44 self.session.close() 45 self.engine.view.pushLayer(MainMenu.MainMenu(self.engine)) 46 self.engine.removeTask(self)4749 try: 50 scene = self.session.world.objects[sceneId] 51 player = self.session.world.objects[playerId] 52 self.engine.view.pushLayer(scene) 53 except KeyError: 54 pass5557 try: 58 scene = self.session.world.objects[sceneId] 59 player = self.session.world.objects[playerId] 60 self.engine.view.popLayer(scene) 61 except KeyError: 62 pass63 69
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Sat Oct 20 15:25:11 2007 | http://epydoc.sourceforge.net |