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

load_char.py 558B

12345678910111213141516171819202122232425
  1. import bge
  2. def main(cont):
  3. own = cont.owner
  4. scene = bge.logic.getCurrentScene()
  5. actu = cont.actuators['start_level']
  6. dict = bge.logic.globalDict
  7. mainDir = bge.logic.expandPath("//")
  8. fileName = mainDir + "characters/" + str(dict["character"]) + '.blend'
  9. path = bge.logic.expandPath(fileName)
  10. bge.logic.LibLoad(path, 'Scene')
  11. # fileName = mainDir + "characters/sun.blend"
  12. #
  13. # path = bge.logic.expandPath(fileName)
  14. # bge.logic.LibLoad(path, 'Scene')
  15. cont.activate(actu)