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

大约有 518 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0070 秒)

101. 从对象池里取出的对象设置坐标失败 [ 74%]

...????底层对象池没有做好? v.pos(nextPost.x, nextPost.y) console.log(nextPost, v.x, v.y) console.log(v)   附件 : --> 2018-05-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 Nothing 赞同来...

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

102. 怎么对动画进行毎帧侦听? [ 74%]

...e);   function _OnComplete() {   var bounds = ani.getGraphicBounds();   console.log(bounds.width);   console.log(bounds.height); } 这样的话获取动画宽高  还是只会取到第一帧宽高  并没有办法取到毎帧的宽高 2017-07-04 添加评论 免费帖 --> 分享 微博 QZONE ...

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

103. 在微信分享成功的回调函数里,Laya播放音效失败。 [ 74%]

...o.visible = true; gameex.bar.destoyRankSprite()  this.nCountDown = 15; // console.log(gameex.snakeSelf) } })     //暂停 GameEx.prototype.pause = function () { console.log("停止播放音乐") Laya.SoundManager.stopMusic(); //停止游戏主循环 Laya.timer.clear(this, this.onLoop); //移除...

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

104. 当使用代码创建打开场景时,onOpened触发了,但场景active和activeInHierarchy还是处于false,请问纯代码怎么实现场景创建激活,谢谢 [ 74%]

...谢谢?   const scene = new Laya.Scene(); scene.onOpened = () => { console.log('scene onOpened'); }; scene.open(); console.log('scene', scene.active, scene.activeInHierarchy); Laya.timer.frameOnce(10, this, () => {   console.log('scene 2', scene.active, scene.activeInHierarchy); });   日...

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

105. 布局后的对象的x y坐标如何获取? [ 74%]

...了centerX 和centerY后,就无法获取到这个Box的坐标了呀? console.log(this.test1.x ) //结果是 0  但console.log 这个对象,可以看到_x _y 的坐标   请问如何获取到这个被布局后的x y坐标呀? 附件 : --> 2019-07-01 添加评论 免费帖 --> 分享 ...

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

106. 不带格式后缀的图片无法成功加载 [ 73%]

...aya.Handler.create(this, () => { let picTemp = Laya.Loader.getRes(url); console.log(picTemp.width) // undefined let nodee = new Laya.Sprite() nodee.texture = picTemp nodee.width = 500 nodee.height = 250 nodee.x = 100 nodee.y = 350 Laya.stage.addChild(nodee) }));上面这个图片无法正常显...

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

107. [LayaAirIDE3]Laya.loader.on(Event.ERROR, this, this.onError) 无法侦听到加载资源失败 [ 73%]

...ate onAssetLoaded(): void     {         // 使用texture         console.log("加载结束");     }      // 加载进度侦听器     private onLoading(progress: number): void     {         console.log("加载进度: " + progress);     }      private onError(err: string):...

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

108. [LayaAir3]Pool对象池获取继承对象时会返回基类对象 [ 73%]

... Laya.Script { onStart() { let item1 = Laya.Pool.createByClass(TestClass); console.log('item1:', item1.type); Laya.Pool.recoverByClass(item1); let item2 = Laya.Pool.createByClass(TestClass2); console.log('item2:', item2.type); console.log(item1 == item2); } } export class TestClass { type = 0; } exp...

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

109. HTMLCanvas Laya.stage.addChild(HTMLCanvas); 挂载到舞台报错 [ 73%]

...);      div.size(600,400);      Laya.stage.addChild(div);      console.log(div);  var myChart = echarts.init(div.getCanvas());  // 指定图表的配置项和数据 var option = { title: { text: 'ECharts 入门示例' }, tooltip: {}, legend: { data:['销量'] }, xAxis: { data: ["衬衫...

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

110. 子容器的事件问题 [ 73%]

...(vhvt); vhvt.on(laya.events.Event.CLICK, this, (event: Laya.Event) => { console.log("为什么这里不进来"); }); } /**  * ViewHeadViewTest  */ class ViewHeadViewTest extends Laya.Sprite {     constructor() {         super();         this.graphics.drawRect(0, 0, 1500, 1500, "#0000f...

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