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

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

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

... console.log("onCallLater triggered"); var 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 = "...

来源: Laya_示例 发布时间: 20241002

2. DOM元素-表单输入 [ 89%]

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

来源: Laya_示例 发布时间: 20241002

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

...ct(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FFFFFF", "center"); Laya.stage.addChild(button); return button; } function onPlayMusic(e) { console.log("播放音乐"); SoundManager.playMusic("../../res/sounds/bgm.mp3", 1, new Handler(this, onComplete)); } funct...

来源: Laya_示例 发布时间: 20241002

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

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

来源: Laya_示例 发布时间: 20241002

5. 鼠标交互-键盘交互 [ 81%]

....width, Laya.stage.height); this.logger.fontSize = 30; this.logger.font = "SimHei"; this.logger.wordWrap = true; this.logger.color = "#FFFFFF"; this.logger.align = 'center'; this.logger.valign = 'middle'; Laya.stage.addChild(this.logger); } } } new laya.Interaction_Keyboard();package { import laya.d...

来源: Laya_示例 发布时间: 20241002