I have a problem when convert project cocos2dx from ver2 to ver 3
I was setup with Android studio and i using C++ 11
Please help me 3 problem on “KgameWorld.cpp” as follows:
1.
Scene *KgameWorld::scene() { auto scene = Scene::create(); auto layer = KgameWorld::create(); scene->addChild(layer); —> error in "scene->addChild": **No matching member function for call to 'addChild'.** return scene; }
2.
if (!Layer::init()) { —> error in "init": **Cannot initialize object parameter of type 'cocos2d::Layer' with an expression of type 'KgameWorld'.** return false; }
this->setTouchEnabled(true); this->scheduleUpdate(); —> error in "this": **Cannot initialize object parameter of type 'cocos2d::Layer' with an expression of type 'KgameWorld'**
Thankyou!
I was comment all scene->addChild(layer);
of all difference class except KgameWorld.cpp but not working
Trung Đức Nguyễn is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.