[]动画无法添加到舞台问题
Laya.Animation.createFrames(["fj/hero_fly1.png", "fj/hero_fly2.png"], "hero_fly");//创建飞机飞行缓存
this.LeadBody = new Laya.Animation();
this.LeadBody.play("hero_fly");//播放动画
this.bound = this.LeadBody.getBounds();
this.LeadBody.pos(-this.bound.width/2,-this.bound.height/2);//设置动画位置
Laya.stage.addChild(this.LeadBody);
上面是代码
this.LeadBody = new Laya.Animation();
this.LeadBody.play("hero_fly");//播放动画
this.bound = this.LeadBody.getBounds();
this.LeadBody.pos(-this.bound.width/2,-this.bound.height/2);//设置动画位置
Laya.stage.addChild(this.LeadBody);
上面是代码
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
Laya_XS
赞同来自: