随笔分类 - cocos2d-x
摘要:在HelloWorldScene.h中声明classHelloWorld:publiccocos2d::CCLayer{public:......CCPointconvertToGL(CCSet*pTouches);virtualvoidccTouchesMoved(CCSet*pTouches,CCEvent*event);private:CCSprite*m_pSprite;};在HelloWorldScene.cpp中作如下声明//on"init"youneedtoinitializeyourinstanceboolHelloWorld::init(){boolbRe
阅读全文
摘要:场景切换voidMyScene::daySceneCallback(CCObject*pSender){CCScene*scene=newMyScene();CCLayer*pLayer=newLayerDay();scene->addChild(pLayer,0);CCDirector::sharedDirector()->pushScene(scene);scene->release();pLayer->release();}带过渡效果voidMyScene::daySceneCallback(CCObject*pSender){CCScene*scene=newM
阅读全文
摘要:如果直接在VS中复制资源项目的Resources文件夹下就会出现上述错误。需要找到项目文件存放位置下的Resources文件夹,把资源文件复制进去才行。
阅读全文

浙公网安备 33010602011771号