• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 234 项符合查询结果, 库内数据总量为 30,723 项。 (搜索耗时: 0.0032 秒)

1. 为什么mc取得的时候有时候mc.getBounds().width;有值有时候是0 [ 100%]

为什么mc取得的时候有时候mc.getBounds().width;有值有时候是0 Event.LOADED事件后输出宽度有时候还是0有时候却有值。这个是为什么呢?已经是在loaded事件以后的输出了。 附件 : --> 2016-12-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

来源: Laya_社区 发布时间: 20161227

2. 为什么获取不到getBounds()的width,height [ 97%]

为什么获取不到getBounds()的width,height 为什么我的playAction中获取不到动画的显示区域,用控制台输出都是0 还有this.body.pos(-bound.width / 2, -bound.height / 2);是动画里面的 feiji.pos(Laya.stage.mouseX, Laya.stage.mouseY);是鼠标监听事件 2个都是设...

来源: Laya_社区 发布时间: 20160729

3. movieClip,如何获取宽度,widthgetbounds 都为零,但是他显示了 [ 95%]

movieClip,如何获取宽度,widthgetbounds 都为零,但是他显示了 附件 : --> 2018-02-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 qian 赞同来自: https://ask.layabox.com/question/1814 ...

来源: Laya_社区 发布时间: 20180211

4. 没有预加载的图片怎么获取width和height ? [ 94%]

...lder.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getBounds().width,older.getBounds().height);      older.scale(2,2);     console.log(older.scaleX,older.scaleY,older.rotation,older.x,older.y, older.width,older.height,older.getGraphicBounds().width,older.getGraphicBou...

来源: Laya_社区 发布时间: 20170118

5. 一个动画我想设置它的大小该怎么取设置啊 [ 90%]

...容相关的链接 提交 4 个回复 cuixueying 赞同来自: 使用ani.getBounds().width,,,ani.getBounds().height即可! 2017-06-29 0 0 分享 微博 QZONE 微信 z298959 赞同来自: 获取宽高2个方式都获取得出来,我的意思是怎么去重新设置这个动画的大小   ...

来源: Laya_社区 发布时间: 20170629

6. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 89%]

...Lel].h); // 球体和城堡的矩形显示区域 var boundBall = this.ball.getBounds(); var boundTower = this.tower.getBounds(); var boundAeroboat = this.aeroboat.getBounds(); var boundMountain = this.mountain.getBounds(); var boundStatue = this.statue.getBounds(); var boundAngel = this.angel.getBou...

来源: Laya_社区 发布时间: 20170720

7. 获取sprite对象的 width和height为0 [ 88%]

...e.addChild(bt) //获取动画大小区域 var bgBound: Laya.Rectangle = bg.getBounds(); var btBound: Laya.Rectangle = bg.getBounds(); console.log(bgBound.width/2) console.log(bgBound.height - 150) bt.pos(bgBound.width/2 - btBound.width/2,bgBound.height - 150) } } //启动游戏 new Game();打印结...

来源: Laya_社区 发布时间: 20160804

8. Spine骨骼动画点击区域偏移 获取不到width height [ 87%]

...);         Laya.stage.addChild(sprite);         console.log(sprite.getBounds());           console.log(sprite.width,sprite.height));      } 附件 : --> ZG.zip 2016-11-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链...

来源: Laya_社区 发布时间: 20161108

9. UI界面加载有哪些回调方法可用 [ 85%]

...件大小是指什么,获取界面组件的宽高吗,你可以试下用getBounds().width去获取试试! 2017-07-20 0 5 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 peterz3g 相关问题 两个对象new了一个相同的对象,...

来源: Laya_社区 发布时间: 20170720

10. 如何获取animation的中点坐标??并且获取animation的width和height都为0是为什么? [ 84%]

...: 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: 用getBounds().width,,,getBounds().height获取,前提要保证animation的资源已经加载完成! 2017-08-10 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 shi...

来源: Laya_社区 发布时间: 20170810