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

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

141. Sprite-遮罩-放大镜 [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load("../../res/bg2.png", Handler.create(this, setup)); })(); function setup() { var bg = new Sprite(); bg.loadImage("../../res/bg2.png"); ...

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

142. 鼠标交互-自定义事件 [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { this.createSprite(); } createSprite() { const Sprite = Laya.Sprite, Event = Laya.Event; this.sp = new ...

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

143. UI-Dialog [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; assets = ["../../res/ui/dialog (1).png", "../../res/ui/close.png"]; Laya.loader.load(assets, Handler.create(this, onSkinLoadComplete)); })();...

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

144. 文本-字符限制 [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } createTexts() { this.createLabel("只允许输入数字:").pos(50, 20); let input = this.createInput(); input.pos(50,...

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

145. UI-Dialog [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load(assets, Handler.create(this, this.onSkinLoadComplete)); } onSkinLoadComplete() { const Dialog = Laya.Dialog, Image = Laya.Im...

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

146. 文本-Overflow [ 75%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; createTexts(); })(); function createTexts() { var t1 = createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); var t2 = createText(); t2.ov...

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

147. Sprite-遮罩-放大镜 [ 75%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.loader.load([bgPath, maskPath], Laya.Handler.create(this, this.setup)); } setup() { const Sprite = Laya.Sprite; let bgRes = Laya.loader....

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

148. UI-Tab [ 75%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; Laya.stage.bgColor = "#3d3d3d"; Laya.loader.load(skins, Handler.create(this, onSkinLoaded)); })(); function onSkinLoaded() { var tabA = creat...

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

149. 文本-Overflow [ 75%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createInput(); } createInput() { const Text = Laya.Text; let t1 = this.createText(); t1.overflow = Text.VISIBLE; t1.pos(10, 10); let t2 ...

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

150. 显示与切换图片(TypeScript-LayaAir基础篇(TS)-位图) [ 75%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#ffffff"; this.showApe(); } private showApe(): void { // 方法1:使用loadImage var ape: Sprite = new Sprite(); ape.pos(100,50); Laya.stage.addChild(ape); ape...

来源: Laya2.0_文档 发布时间: 20210715