comparison demos/rpg/scripts/gamecontroller.py @ 560:69d50e751c9a

Lots of changes. - Added the Serializer class - Made exceptions a little more usable - Added actor attributes (not used yet but will be with the combat engine) - Made the quest dialogs more customizable - Many other small changes
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Wed, 23 Jun 2010 19:20:24 +0000
parents 718e154a43c8
children f85762e634c5
comparison
equal deleted inserted replaced
559:cccff9b04f57 560:69d50e751c9a
20 # You should have received a copy of the GNU Lesser General Public 20 # You should have received a copy of the GNU Lesser General Public
21 # License along with this library; if not, write to the 21 # License along with this library; if not, write to the
22 # Free Software Foundation, Inc., 22 # Free Software Foundation, Inc.,
23 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 23 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 # #################################################################### 24 # ####################################################################
25 # This is the rio de hola client for FIFE.
26 25
27 import sys, os, re, math, random, shutil, glob, uuid 26 import sys, os, re, math, random, shutil, glob, uuid
28 27
29 from fife import fife 28 from fife import fife
30 29
303 302
304 self._guicontroller.hideMainMenu() 303 self._guicontroller.hideMainMenu()
305 304
306 for filename in glob.glob(os.path.join("saves" , "*.xml")): 305 for filename in glob.glob(os.path.join("saves" , "*.xml")):
307 os.remove(filename) 306 os.remove(filename)
308 307
309 self._questmanager.destroy() 308
310 self._questmanager.initializeQuests() 309 self._questmanager.reset()
310 self._questmanager.deserialize()
311 311
312 mapname = self._settings.get("RPG", "TownMapFile", "town") 312 mapname = self._settings.get("RPG", "TownMapFile", "town")
313 self.loadMap(mapname) 313 self.loadMap(mapname)
314 314
315 315
356 if self._scene: 356 if self._scene:
357 self._scene.serialize() 357 self._scene.serialize()
358 358
359 self._listener.detach() 359 self._listener.detach()
360 self._scene.destroyScene() 360 self._scene.destroyScene()
361 self._questmanager.destroy() 361 self._questmanager.reset()
362 362
363 self._scene = None 363 self._scene = None
364 self._instancerenderer = None 364 self._instancerenderer = None
365 self._floatingtextrenderer = None 365 self._floatingtextrenderer = None
366 366