Shuvit game master repo. http://shuvit.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

game.py 540B

12345678910111213141516171819202122232425
  1. import bge
  2. import FSM
  3. import requests
  4. import platform
  5. def phone_home():
  6. url = 'https://shuvit.org/phone_home.php'
  7. n = platform.uname()
  8. n = platform.platform()
  9. myobj = {'somekey': n}
  10. x = requests.post(url, data = myobj, timeout=3.50)
  11. print('phone home response')
  12. print(x.text)
  13. def main(cont):
  14. own = cont.owner
  15. dict = bge.logic.globalDict
  16. if 'game_inited' not in own:
  17. info = bge.logic.PrintGLInfo()
  18. own['game_inited'] = True
  19. own['cont'] = cont
  20. dict['gameFSM'] = FSM.GameFSM(own)
  21. #phone_home()
  22. dict['gameFSM'].Execute()