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

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

1. 计时器-延迟调用 [ 100%]

... console.log("onCallLater triggered"); let text = new Text(); text.font = "SimHei"; text.fontSize = 30; text.color = "#FFFFFF"; text.text = "打开控制台可见该函数仅触发了一次"; text.size(Laya.stage.width, Laya.stage.height); text.wordWrap = true; text.valign = "middle"; text.align = "...

来源: Laya2.0_示例 发布时间: 20241001

2. 鼠标交互-键盘交互 [ 93%]

...Laya.stage.width, Laya.stage.height); logger.fontSize = 30; logger.font = "SimHei"; logger.wordWrap = true; logger.color = "#FFFFFF"; logger.align = 'center'; logger.valign = 'middle'; Laya.stage.addChild(logger); } keyboardInspector() { let numKeyDown = keyDownList.length; let newText = '[ '; conso...

来源: Laya2.0_示例 发布时间: 20241001

3. 音频-播放演示 [ 89%]

...t(0, 0, w, h, "#FF7F50"); btn.graphics.fillText(labelText, w / 2, 8, "24px SimHei", "#FFFFFF", "center"); return btn; } // 播放音效 onPlaySound() { console.log("播放音效"); Laya.SoundManager.playSound("res/sounds/btn.mp3", 1, new Laya.Handler(this, this.onComplete)); } // 播放音乐 onPlay...

来源: Laya2.0_示例 发布时间: 20241001

4. DOM元素-表单输入 [ 88%]

...t.height = this.rowHeight; t.valign = "middle"; t.fontSize = 15; t.font = "SimHei"; t.text = label; t.pos(x, y); this.form.addChild(t); } createInputElement(){ let input = Laya.Browser.createElement("input"); input.style.zIndex = Laya.Render.canvas.zIndex + 1; input.style.width = "100px"; Laya.Brows...

来源: Laya2.0_示例 发布时间: 20241001

5. 计时器-延迟执行 [ 85%]

...F50"); button.size(w, h); button.graphics.fillText(label, w / 2, 17, "20px simHei", "#ffffff", "center"); return button; } onDecreaseAlpha1(e) { const Event = Laya.Event; //移除鼠标单击事件 this.button1.off(Event.CLICK, this, this.onDecreaseAlpha1); //定时执行一次(间隔时间) Laya.ti...

来源: Laya2.0_示例 发布时间: 20241001

6. UI-RefreshList [ 21%]

...,省略10字……"; this.addChild(this.LmsgText); this.LmsgText.font = "SimHei"; this.LmsgText.fontSize = 18; this.LmsgText.color = "#322f2f"; this.LmsgText.pos(88, 56); this.LmsgText.width = 307; this.LmsgText.height = 20; // 列表item操作一 this.flag = new Box(); this.flag.name = "flag"; th...

来源: Laya2.0_示例 发布时间: 20241001