CCLayer相关资料
来源:互联网 发布:淘宝图片跳转链接代码 编辑:程序博客网 时间:2024/06/04 20:13
cocos2d-x给CCLayer的子类提供了2个宏,这两个宏用来生成CCLayer的node方法
#define LAYER_NODE_FUNC(layer) 这个宏生成的node方法是不带参数的,需要子类有一个没有参数的init()方法
#define LAYER_NODE_FUNC_PARAM(layer,__PARAMTYPE__,__PARAM__) 这个宏生成的node方法带参数,需要子类有一个带相同参数的init方法
class BackgroundLayer:public CCLayer{public: LAYER_NODE_FUNC(BackgroundLayer); LAYER_NODE_FUNC_PARAM(BackgroundLayer, CCString*, id); virtual bool init(); virtual bool init(CCString* id);};
使用:
backgroundLayer = BackgroundLayer::node();this->addChild(backgroundLayer); backgroundLayer = BackgroundLayer::node(m_scnID);this->addChild(backgroundLayer);
- CCLayer相关资料
- 相关资料
- 相关资料
- 相关资料
- 相关资料
- 相关资料:
- 相关资料
- 相关资料
- 典型相关分析相关资料
- php5相关网上资料
- SIP协议相关资料
- php相关资料
- 智能客户端相关资料
- Reflactor相关资料
- ThreadLocal的相关资料
- 个人相关资料
- lucene相关资料
- .net 相关资料链接
- 常见设计模式面试题
- 约瑟夫环非递归算法分析
- 你若安好
- Sql Server子查询、GROUP BY分组、having查询
- 条款18:让接口容易被正确使用,不容易被误用
- CCLayer相关资料
- shell脚本不换行刷新数据
- Kinect for Windows SDK开发入门(二):基础知识 上
- ASP.NET MVC 中 Ajax.ActionLink 的使用
- Objective-C简介
- 蝴蝶兰与鳞托菊
- 实现声明式事务,在Services.xml
- mount: you must specify the filesystem type
- 生化危机4 宝物组合