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

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

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

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createSprite(); })(); function createSprite() { sp = new Sprite(); sp.graphics.drawRect(0, 0, 200, 200, "#D2691E"); sp.pivot(100, 100); sp.x = Laya.sta...

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

132. Sprite-轴心点 [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createApes(); })(); function createApes() { var gap = 300; sp1 = new Sprite(); sp1.loadImage("../../res/apes/monkey2.png", 0, 0); sp1.pos((Laya.stage.w...

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

133. 为什么在 Layaair调试时,屏幕总是横着的 [ 76%]

...aya.stage.scaleMode = Stage.SCALE_NOSCALE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.alignV = Stage.ALIGN_CENTER; Laya.stage.screenMode = Stage.SCALE_SHOWALL; 是这样设置的

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

134. 计时器-间隔循环 [ 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() { let vGap = 100; this.rotateTimeBasedText = this.createText("基于时间旋转", Laya.stage.width / 2,...

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

135. 输入设备-摇一摇 [ 76%]

...sole.y; console.color = "#FFFFFF"; console.fontSize = 50; console.align = "center"; console.valign = 'middle'; console.leading = 10; } function startShake() { Shake.instance.start(5, 500); Shake.instance.on(Laya.Event.CHANGE, this, onShake); console.text = '开始接收设备摇动\n'; } function on...

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

136. Sprite-节点控制 [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; this.ape1 = new Sprite(); this.ape2...

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

137. 分享个用美术资源做位图文本的方法。。。 [ 76%]

...onData,imageData,600,"left"); var bp1 = new BPFont(jsonData,imageData,600,"center"); var bp2 = new BPFont(jsonData,imageData,600,"right"); bp.padding = bp1.padding = bp2.padding = -7; Laya.stage.addChild(bp); Laya.stage.addChild(bp1); Laya.stage.addChild(bp2); var t = 1000; Laya.timer.loop(1000,that...

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

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

...); 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() { createLabel("只允许输入数字:").pos(50, 20); var input = createInput(); input.pos(50, 5...

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

139. 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([texture1, texture2], Handler.create(this, onAssetsLoaded)); })(); function onAssetsLoaded() { ape = new Sprite(); Laya.stage.addChild...

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

140. Sprite-轴心点 [ 76%]

...); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createApes(); } createApes() { const Sprite = Laya.Sprite; let monkey2Path = "res/apes/monkey2.png"; let gap = 150; this.ape1 = new Spri...

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