Mercurial > fife-parpg
comparison demos/rpg/scripts/rpg.py @ 543:cb7ec12214a9
Items can now be serialized/deserialized to/from disk. I haven't finished actors yet. This allows for persistent states when you enter/leave maps.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 02 Jun 2010 21:43:03 +0000 |
parents | 1afe46247ab1 |
children | d0282579668c |
comparison
equal
deleted
inserted
replaced
542:67f6f3538e88 | 543:cb7ec12214a9 |
---|---|
87 | 87 |
88 def onCommand(self, command): | 88 def onCommand(self, command): |
89 self.quit = (command.getCommandType() == fife.CMD_QUIT_GAME) | 89 self.quit = (command.getCommandType() == fife.CMD_QUIT_GAME) |
90 if self.quit: | 90 if self.quit: |
91 command.consume() | 91 command.consume() |
92 self._gamecontroller.endGame() | |
92 | 93 |
93 def onConsoleCommand(self, command): | 94 def onConsoleCommand(self, command): |
94 result = "" | 95 result = "" |
95 | 96 |
96 args = command.split(" ") | 97 args = command.split(" ") |
147 self.engine.getEventManager().dispatchCommand(cmd) | 148 self.engine.getEventManager().dispatchCommand(cmd) |
148 | 149 |
149 def _pump(self): | 150 def _pump(self): |
150 if self._listener.quit: | 151 if self._listener.quit: |
151 self.breakRequested = True | 152 self.breakRequested = True |
152 self._gamecontroller.endGame() | |
153 else: | 153 else: |
154 self._gamecontroller.pump() | 154 self._gamecontroller.pump() |
155 | 155 |
156 | 156 |
157 def _getLogManager(self): | 157 def _getLogManager(self): |