Where should system initialization methods be placed in Cocos2d-x?

五迷三道 提交于 2020-01-03 03:24:06

问题


I've developed a number of applications using Cocos2d-x on the iOS platform.

I have always placed the loading of resources, preloading of audio, and initialization of system components into the AppDelegate::applicationDidFinishLaunching() function, or had it call the initialization routine from there. This was because this is the place where the first main scene for the application is selected and loaded into the CCDirector.

Recently, one of my tutorials was ported to Windows and it appears this was not being called. Perhaps it does not even exist in Android or other target platforms for cocos2d-x (I only deal with one for now).

Is there a common location across all platforms where cocos2d-x expect you to place the "Application Initialization" code?

来源:https://stackoverflow.com/questions/20743976/where-should-system-initialization-methods-be-placed-in-cocos2d-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!