[]Animation创建时无法获取高度
var roleAni = new Laya.Animation();
roleAni.loadImages( this.aniUrls( v1, v2, tip, frames ) ).play();
roleAni.pos(x,y);
this.root.addChild( roleAni );
roleAni.pivotY = roleAni.getBounds().height;
console.log("---> ", roleAni.getBounds() );
打印为 ---> Rectangle {x: 0, y: 0, width: 0, height: 0}修改anchorY值无效
没有找到相关结果
已邀请:
2 个回复
cuixueying
赞同来自:
2、添加一个ani.on(Event.LOADED)事件,在hui回调里获取宽高看下!
y1036687157
赞同来自: