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

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

51. Sprite-切换纹理 [ 86%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; Laya.loader.load([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild(ape); ape.pivot(55...

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

52. 鼠标交互-自定义事件 [ 86%]

...V = 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 Sprite(); this.sp.g...

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

53. 文本-字符限制 [ 86%]

...V = 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, 50); input.restric...

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

54. 游戏铺满固定大小容器,火狐和谷歌正常,edge会有滚动条? [ 86%]

...ClientWidth);                         if(Laya.stage.scaleMode != Laya.Stage.SCALE_SHOWALL){                             Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL;                         }                 ...

来源: Laya_社区 发布时间: 20190514

55. 鼠标交互-键盘交互 [ 86%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; setup(); })(); function setup() { listenKeyboard(); createLogger(); Laya.timer.frameLoop(1, this, keyboardInspector); } function listenKeyboard() { keyDownList = []; //...

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

56. 输入设备-摇一摇 [ 86%]

...ion() { Laya.init(picW, Browser.height * picW / Browser.width); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; showShakePic(); showConsoleText(); startShake(); })(); function showShakePic() { var shakePic = new Sprite(); shakePic.loadImage("../../res/inputDevice/shake.png"); Laya.stage.addChild(shakePi...

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

57. UI-Dialog [ 86%]

...V = 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)); })(); function onSkinLoa...

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

58. 程序当中更改适配模式后,没有生效成相对应的适配模式效果是为什么? [ 86%]

...ntHeight; if (stageWidth < stageHeight) { console.log("one", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_NOSCALE; //1 console.log("one1", Laya.stage.scaleMode) } else { console.log("two", Laya.stage.scaleMode) Laya.stage.scaleMode = Laya.Stage.SCALE_EXACTFIT; console.log("two2",...

来源: Laya_社区 发布时间: 20170920

59. UI-Dialog [ 86%]

...V = 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.Image, Button = Laya....

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

60. 输入设备-摇一摇 [ 86%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.showShakePic(); this.showConsoleText(); this.startShake(); } showShakePic() { const Sprite = Laya.Sprite; let shakePic = new Sprite(); shakePic.loadImage("...

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