精灵切割
2016-06-16 16:09
162 查看
1.var sp = new cc.Sprite( res.pintu_1_jpg); sp.setPosition(cc.winSize.width>>1,cc.winSize.height>>1); //添加精灵图片 this.addChild(sp); var teel = new cc.Sprite( res.pintu_1_jpg,cc.rect(100,0,100,100)); //通过rect进行切割,(0,0)点是从图片左上角开始切割 teel.setPosition(200,300); this.addChild(teel,1);
相关文章推荐
- ACdream 1216Beautiful People(二重最长上升子序列)
- flask学习笔记(一安装配置)
- ftp server服务器
- 亿级Web系统搭建:单机到分布式集群【转】
- 深入浅出Mybatis系列(三)---配置详解之properties与environments(mybatis源码篇)
- 转:Selenium WebDriver 中鼠标和键盘事件分析及扩展
- 技术预览:CentOS 7中利用Snapper GUI管理系统快照
- JPA搭建
- [leetcode] 【栈】 32. Longest Valid Parentheses
- app开发->打电话
- Android渠道商做假激活量!教你分辨!
- 剑指offer:重建二叉树
- char 直接转换成数字的方法(no ascii)
- [jQuery]最新的 3.0 已发布
- 读书小笔记 (C和指针)
- 随机事件、随机变量、概率、概率密度函数
- crontab
- 栈与堆的区别
- SVM-核函数
- CMD模块写法