Esempio n. 1
0
 def execute(self, context):
     # send disconnect to quit gameengine
     Client().send(Message("/bge/logic/endGame"))
     return {'FINISHED'}
Esempio n. 2
0
 def execute(self, context):
     # restart gameengine by sending restartGame()
     if self.save:
         bpy.ops.wm.save_as_mainfile(filepath=context.blend_data.filepath)
     Client().send(Message("/bge/logic/restartGame"))
     return {'FINISHED'}