TexturePacker使用技巧总结
2015-07-07 03:14
302 查看
一、合图相关技巧
1.Trim参数可以指定是否消除png图片周围的空白区域。
合图完成之后,将会产生plist文件和png文件,需要在Cocos2dx里面导入。
二、Cocos2dx中导入
三、外部链接
这个网址对有些选项的解释很到位:http://blog.csdn.net/azhou_hui/article/details/9113907
1.Trim参数可以指定是否消除png图片周围的空白区域。
合图完成之后,将会产生plist文件和png文件,需要在Cocos2dx里面导入。
二、Cocos2dx中导入
//添加到精灵帧缓存中 SpriteFrameCache::getInstance()->addSpriteFramesWithFile("texturepacker.plist", "texturepacker.png"); //使用精灵帧缓存中得数据来初始化精灵 Sprite* button = Sprite::createWithSpriteFrame(SpriteFrameCache::getInstance()->getSpriteFrameByName("button_close.png")); button->setAnchorPoint(Vec2(0, 0)); button->setPosition(Vec2(0, 0)); this->addChild(button);
三、外部链接
这个网址对有些选项的解释很到位:http://blog.csdn.net/azhou_hui/article/details/9113907
相关文章推荐
- Introduction to Locking in SQL Server
- ajax核心技术1---XMLHttpRequset对象的使用
- Android下定时任务
- DOS命令让电脑发射wifi
- 【hello,world 也打脸】记storm-starter在某知名IDE下的悲催调试经历
- #leetcode#Implement strStr()
- File总结_day19
- java HashMap以及concurrenHashMap
- ios 苹果自带的get请求
- 快速排序
- iosGET同步、异步请求
- IO操作 第一篇 学习(转载)
- Matlab应用实例(7)—fgoalattain
- Add and Search Word - Data structure design
- xcode 自己常用到的快捷键
- 事件处理原理(IOS篇) by sixleaves
- C语言获取系统时间
- iOS验证邮箱, 手机号, 密码, 账户名 --- 正则表达式
- 《软件测试管理公开课》2015.8.7~8 深圳 2015.8.11~12 北京 2015.8.18~19上海,欢迎报名!
- SQLAlchemy使用笔记