fix bugs

adjust the code for cocos2dx 3.2
修改让程序运行起来