[]loadImage加载资源的同时指定x,y和sprite对象指定x,y相同的值为什么结果不同


var ape = new Sprite();
ape.loadImage("../bin/res/images/2.png",(Laya.stage.width)/2,(Laya.stage.height)/2);
 
效果和
ape.x=(Laya.stage.width)/2;
ape.y=(Laya.stage.height)/2;不同这是为什么?
已邀请:

Monica - 知识达人

赞同来自:

第一种方式是图片在sprite容器中的坐标
第二种方式改的是sprite容器的坐标
 

shaozhen

赞同来自:

谢谢

该问题目前已经被锁定, 无法添加新回复

商务合作
商务合作