大约有 513 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0063 秒)
...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
...谢谢? 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
...了centerX 和centerY后,就无法获取到这个Box的坐标了呀? console.log(this.test1.x ) //结果是 0 但console.log 这个对象,可以看到_x _y 的坐标 请问如何获取到这个被布局后的x y坐标呀? 附件 : --> 2019-07-01 添加评论 免费帖 --> 分享 ...
来源: Laya_社区 发布时间: 20190701
...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
...ate onAssetLoaded(): void { // 使用texture console.log("加载结束"); } // 加载进度侦听器 private onLoading(progress: number): void { console.log("加载进度: " + progress); } private onError(err: string):...
来源: Laya_社区 发布时间: 20240705
... 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
...); 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
...(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
...ns; myI18n = await Laya.loader.load("editorResources/i18nSettings.i18ns"); console.log(myI18n.t("a")); 在很多情况下,如果只是代码里用到的一些小量国际化的支持,并不想创建多个json文件,那么也有全代码的方法。 //第一个参数需要全局唯一 let myI18...
来源: Laya3.0_文档 发布时间: 20251010
... 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