Changeset 28
- Timestamp:
- 02/04/10 05:17:02 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rc/puzzlebox_brainstorms_client_interface.py
r27 r28 229 229 ################################################################## 230 230 231 def send_commands_to_server(self, commands):232 233 for command in commands:234 235 d = self.send_command(command)236 237 238 #Command Line Client version239 #command_line = 'python puzzlebox_brainstorms_client.py %s' % command240 241 #if self.DEBUG:242 #print "executing: %s" % command_line243 244 #os.system(command_line)245 246 247 ##################################################################248 249 231 def check_events(self): 250 251 commands = []252 232 253 233 for event in self.pygame.event.get(): … … 272 252 command = self.match_key_index[key_pressed] 273 253 self.update_button(command, activated=True) 274 commands.append(command)254 self.send_command(command) 275 255 276 256 … … 286 266 command = self.match_key_index[key_pressed] 287 267 self.update_button(command, activated=False) 288 289 290 if commands != []: 291 self.send_commands_to_server(commands) 268 269 270 else: 271 272 if self.DEBUG > 2: 273 print "Unrecognized event:", 274 print event 292 275 293 276
Note: See TracChangeset
for help on using the changeset viewer.