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

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

131. Sprite-切换纹理 [ 84%]

...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_示例 发布时间: 20241117

132. 鼠标交互-自定义事件 [ 84%]

...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_示例 发布时间: 20241117

133. 1.7.14beta测试版及之后的版本初始化后有滚动条 [ 84%]

...现步骤,用IDE默认的UI示例,在Laya.init以后设置Laya.stage.scaleMode Laya.init(600, 400); Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_HEIGHT;   这个情况在1.7.13及以前的版本是没有的,希望早日修改   附件 : --> 2018-01-29 添加评论 免费帖 --> 分享 微...

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

134. 文本-字符限制 [ 84%]

...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_示例 发布时间: 20241117

135. 鼠标交互-键盘交互 [ 84%]

...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_示例 发布时间: 20241117

136. 网络和格式-POST [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; connect(); showLogger(); })(); function connect() { hr = new HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequ...

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

137. 输入设备-摇一摇 [ 84%]

...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_示例 发布时间: 20241117

138. 网络和格式-GET [ 84%]

...V = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; connect(); showLogger(); })(); function connect() { hr = new HttpRequest(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequ...

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

139. UI-Dialog [ 84%]

...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_示例 发布时间: 20241117

140. 文本-Overflow [ 84%]

...V = 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.overflow = Text.SCROL...

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