comparison demos/rpg/scripts/gamecontroller.py @ 530:ea26e7b6f56c

Added the loadActor and loadItem functions so you can load single items at any time. Cleaned up the base object a bit so you can modify it's position easily.
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 28 May 2010 20:10:33 +0000
parents 796d49ab9380
children 801746c5bb9a
comparison
equal deleted inserted replaced
529:d0bce896a526 530:ea26e7b6f56c
195 def onConsoleCommand(self, command): 195 def onConsoleCommand(self, command):
196 """ 196 """
197 Might be useful if you want to have the game parse a command. 197 Might be useful if you want to have the game parse a command.
198 Not sure if I am going to keep this or not. 198 Not sure if I am going to keep this or not.
199 """ 199 """
200
200 result = "" 201 result = ""
202
203 args = command.split(" ")
204 for arg in args:
205 arg = arg.strip()
206
207 if args[0] == "spawn":
208 if len(args) != 4:
209 result = "Usage: spawn [itemid] [posx] [posy]"
210 else:
211 result = "Success!"
212
201 return result 213 return result
202 214
203 def newGame(self): 215 def newGame(self):
204 self._guicontroller.hideMainMenu() 216 self._guicontroller.hideMainMenu()
205 217