CCSpriteBatchNode读取plist
来源:互联网 发布:java工作日报 编辑:程序博客网 时间:2024/06/05 21:01
//首先将plist读到缓存中
CCSpriteFrameCache::sharedSpriteFrameCache()->addSpriteFramesWithFile("popstar.plist", "popstar.png");
//将资源添加到CCSpriteBatchNode里。
CCSpriteBatchNode *aParent = CCSpriteBatchNode::create("popstar.png");
addChild(aParent);
//创建精灵并添加到CCSpriteBatchNode里,1000.png是popstar.plist的一个资源
CCSprite *pFather = CCSprite::createWithSpriteFrameName("1000.png");
pFather->setPosition(ccp(200,200));
aParent->addChild(pFather);
如此一来,不管需要显示多少个精灵,相同的精灵只会添加一个。
0 0
- CCSpriteBatchNode读取plist
- 读取plist。
- CCSpriteBatchNode与"pvr.ccz","plist"精灵优化及注意事项
- CCSpriteBatchNode与"pvr.ccz","plist"精灵优化及注意事项
- CCSpriteBatchNode
- CCSpriteBatchNode
- CCSpriteBatchNode
- CCSpriteBatchNode
- CCSpriteBatchNode
- CCSpriteBatchNode
- 读取iphone系统plist
- 读取plist文件
- IOS读取.plist文件
- NSArray 读取plist文件
- 读取plist文件
- 读取plist数据文件1
- OC读取plist文件
- 读取plist文件
- 发外链的窍门
- 终极理解ON_MESSAGE和ON_NOTIFY
- Hibernate
- 生命周期函数
- sublime text2/3怎样在windows中配置ctags插件
- CCSpriteBatchNode读取plist
- C++中,如何执行一个控制台命令并返回结果到字符串string中
- jobschu boa、cgi组合利用html到cgi的实现代码
- Valid Parentheses
- codeforce Present from Lena 打印菱形
- Android读写配置文件
- cocos2d-x3.0 相对布局(一)
- java socket 多线程
- CM之过程总览