Shuvit game master repo. http://shuvit.org
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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()