mirror of https://github.com/axmolengine/axmol.git
Merge pull request #10564 from SunLightJuly/v3_fix
support packages manager
This commit is contained in:
commit
0e303536f7
|
@ -22,6 +22,13 @@ void AppDelegate::initGLContextAttrs()
|
|||
GLView::setGLContextAttrs(glContextAttrs);
|
||||
}
|
||||
|
||||
// If you want to use packages manager to install more packages,
|
||||
// don't modify or remove this function
|
||||
static int register_all_packages()
|
||||
{
|
||||
return 0; //flag for packages manager
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching() {
|
||||
// initialize director
|
||||
auto director = Director::getInstance();
|
||||
|
@ -37,6 +44,8 @@ bool AppDelegate::applicationDidFinishLaunching() {
|
|||
// set FPS. the default value is 1.0/60 if you don't call this
|
||||
director->setAnimationInterval(1.0 / 60);
|
||||
|
||||
register_all_packages();
|
||||
|
||||
// create a scene. it's an autorelease object
|
||||
auto scene = HelloWorld::createScene();
|
||||
|
||||
|
|
|
@ -43,6 +43,13 @@ void AppDelegate::initGLContextAttrs()
|
|||
GLView::setGLContextAttrs(glContextAttrs);
|
||||
}
|
||||
|
||||
// If you want to use packages manager to install more packages,
|
||||
// don't modify or remove this function
|
||||
static int register_all_packages()
|
||||
{
|
||||
return 0; //flag for packages manager
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
{
|
||||
// set default FPS
|
||||
|
@ -54,8 +61,7 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
lua_State* L = engine->getLuaStack()->getLuaState();
|
||||
lua_module_register(L);
|
||||
|
||||
// If you want to use Quick-Cocos2d-X, please uncomment below code
|
||||
// register_all_quick_manual(L);
|
||||
register_all_packages();
|
||||
|
||||
LuaStack* stack = engine->getLuaStack();
|
||||
stack->setXXTEAKeyAndSign("2dxLua", strlen("2dxLua"), "XXTEA", strlen("XXTEA"));
|
||||
|
|
Loading…
Reference in New Issue