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

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

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

... 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

272. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 71%]

...tring:string = "./sounds/hit.wav";  private onPlayMusic(e: Event): void { console.log("播放音乐"); SoundManager.playMusic(this.musicString, 1, new Handler(this, this.onComplete)); }  private onPlaySound(e: Event): void { console.log("播放音效"); SoundManager.playSound(this.soundString, 1, ...

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

273. list 渲染不出Text [ 71%]

list 渲染不出Text console.log 能打印出数据,但是没有在游戏上显示出来,头像是现实出来了的,也没报错  是什么原因呢? 附件 : --> 2018-11-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接...

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

274. websocket服务端显示连接成功,客户端未进行回调 [ 71%]

...p udp //创建server服务 var server = net.createServer(function (conn) { console.log('new connection is connecting') conn.write('\n hello buddy') }); server.listen(8081, function () { console.log('server is listening') // server.emit('connection'); }); 2019-04-23 添加评论 免费帖 --> 分享 ...

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

275. Socket能连接到服务器,客户端发请求也能收到服务端的数据,但是服务端主动推送数据,客户端就是收不到数据? [ 71%]

...n ;         }          ws.onopen = function() {             console.log("---open----");             //设置发信息送类型为:ArrayBuffer             ws.binaryType = "string";             if(SocketJS.OnOpenMsg!=null)SocketJS.OnOpenMsg();         }       ...

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

276. Button 添加事件不执行? [ 71%]

... clickHandler); rightBtn.clickHandler = Handler.create(this, function () { console.log('click handler'); }); function clickHandler () { console.log('on click') } Stage.addChild(rightBtn);  请问一下,为什么事件不执行啊? 2018-03-09 添加评论 免费帖 --> 分享 微博 QZONE 微信...

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

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

...);      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

278. [0]GPUInstance在半透明渲染队列下不会自动合批 [ 71%]

...有完全展示数组数据,只展示了其中的图片部分,数组能console出,那个list中的数据也存在,但没渲染出。 JS 是没有自动补全提示吗 Laya 安卓端 在服务端运行指令layadcc ./ 后进不去,提示 assetId is old 和 init dcc fail。然后过五六个...

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

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

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

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

280. loop 我想在回调里暂停,然后在开启 [ 71%]

...ticeList.scrollBar.value = i * 5        if (i % 6 == 0) {         console.log("在这里停止", i)        }       else{ console.log("在这里开始", i)        }  });   2017-07-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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