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

player.py 247B

1234567891011121314
  1. import bge
  2. import FSM
  3. def update(cont):
  4. #print('-------------player updating----------------')
  5. dict = bge.logic.globalDict
  6. own = cont.owner
  7. if 'playerFSM' not in dict:
  8. dict['playerFSM'] = FSM.PlayerFSM(own)
  9. dict['playerFSM'].Execute()