我是将这个工程导出后的resource文件下的publish拷到cocos2d 3.11自带cpp-test win32工程下的resource下,然后改了AppDelegate.cpp下
AppDelegate::applicationDidFinishLaunching()函数最后几句。我把最后几句全部贴出来
auto scene = Scene::create();
// auto layer = new TestController();
auto layer = cocostudio::SceneReader::getInstance()->createNodeWithSceneFile(“publish/testScene.json”);
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
//layer->addConsoleAutoTest();
#endif
//layer->autorelease();
// layer->addConsoleAutoTest();
scene->addChild(layer);
director->runWithScene(scene);
// Enable Remote Console
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT)
//auto console = director->getConsole();
//console->listenOnTCP(5678);
//Configuration *conf = Configuration::getInstance();
//bool isAutoRun = conf->getValue(“cocos2d.x.testcpp.autorun”, Value(false)).asBool();
//if(isAutoRun)
//{
// // layer->startAutoRun();
//}
#endif
return true;