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

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

1. UI-ComboBox [ 100%]

...aya.stage.addChild(comboBox); comboBox.labelSize = 30; comboBox.itemSize = 25; comboBox.selectHandler = new Handler(this, this.onSelect, [comboBox]); return comboBox; } onSelect(cb) { console.log("选中了: " + cb.selectedLabel); } } new UI_ComboBox();module laya { import Stage = Laya.Stage; impo...

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

2. 加载-销毁Texture使用的图片资源 [ 87%]

...ion(); this.aniFly.loadAtlas(PathFly); this.aniFly.play(); this.aniFly.pos(250, 100); Laya.stage.addChild(this.aniFly); // 创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁"...

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

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

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

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

4. UI-RefreshList [ 59%]

...; this.loadingLabel.font = "Microsoft YaHei"; this.loadingLabel.fontSize = 25; this.loadingLabel.color = "#a6a6a6"; this.loadingLabel.pos(61, 24); this.refreshLoading.addChild(this.loadingLabel); Laya.stage.addChild(this.baseBox); // 列表 this.refreshList = new List(); this.refreshList.repeatX = 1...

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

5. 2D物理-仿生机器人 [ 27%]

...cale]; const p5 = [60 * s * this.scale, 15 * -1 * this.scale]; const p6 = [25 * s * this.scale, 37 * -1 * this.scale]; let leg1 = new Sprite(); leg1.pos(this.pos[0] + this.m_offset[0], this.pos[1] + this.m_offset[1] + 16 * this.scale); // TODO 这里的数值待优化 this.Main.box2D.addChild(leg1);...

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