您的位置:首页 > 其它

精灵切割

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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: