1.更改场景类的继承关系。将HelloWorld : public class cocos2d::CCLayer 更改为HellowWorld : public class cocos2d::CCLayerColor.
2.更改初始化函数。将CC_BREAK_IF(! CCLayer::init())更改为 CC_BREAK_IF(!CCLayerColor::initWithColor(ccc4(255,255,255,255)));
本文共 287 字,大约阅读时间需要 1 分钟。
1.更改场景类的继承关系。将HelloWorld : public class cocos2d::CCLayer 更改为HellowWorld : public class cocos2d::CCLayerColor.
2.更改初始化函数。将CC_BREAK_IF(! CCLayer::init())更改为 CC_BREAK_IF(!CCLayerColor::initWithColor(ccc4(255,255,255,255)));
转载于:https://www.cnblogs.com/guotao/archive/2013/05/07/3064305.html