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.

player.py 556B

123456789101112131415161718192021222324252627282930
  1. import bge
  2. import FSM
  3. class Player:
  4. def __init__(self, own):
  5. self.owner = own
  6. self.FSM = FSM.PlayerFSM(own)
  7. self.walking = True
  8. def update(self):
  9. self.FSM.Execute()
  10. def get_ground_ray(self):
  11. pass
  12. def get_ground_dist(self, groundray):
  13. pass
  14. def update(cont):
  15. #print('-------------player updating----------------')
  16. dict = bge.logic.globalDict
  17. own = cont.owner
  18. if 'player_class' not in dict:
  19. #dict['playerFSM'] = FSM.PlayerFSM(own)
  20. dict['player_class'] = Player(own)
  21. #dict['playerFSM'].Execute()
  22. dict['player_class'].update()