[]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值无效
已邀请:

cuixueying

赞同来自:

1、加个timer延迟,然后获取宽高看下
2、添加一个ani.on(Event.LOADED)事件,在hui回调里获取宽高看下!

y1036687157

赞同来自:

好吧,暂时没有其他的解决办法,用延迟函数去处理了..

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

商务合作
商务合作