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 567B

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