在添加类时应包含#include"cocos2d.h" 使用命名空间USING_NS_CC
在创建类的对象时应该现在头文件中这样定义:CREATE_FUNC(类名);然后通过类名::create()方法创建
在场景切换时应使用Director::getInstance()::->replaceScene(TransitionFadeDown::create(scene,0.2));
单次调度 this->scheduleOnce(schedule_selector(类名::函数名),时间);其中的函数必须有一个float 型的参数来传递时间
创建位图字体标签的方法:auto label=Label::create("fonts/futura-48.fnt","2048");
label->setPosition();
this->addChild(label);
创建标签类型的菜单并设置回调函数的方法:auto menuItem=MenuItemLabel::create(label,CC_CALLBACK_1(GameOver::menuCallBack,this));
GameOver::menuCallBack(Ref*pObject){};
加载音乐的方法:首先包含头文件#include"SimpleAudioEngine.h"使用命名空间using namespace CocosDenshion;