大约有 11 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0027 秒)
...发更高效。var Loader = Laya.Loader; var Handler = Laya.Handler; var Event = Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.bt...
来源: Laya2.0_示例 发布时间: 20200319
...FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBridge(); this.eventListener(); } createBridge() { const startPosX = 250, startPosY = 450; let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let groundBody = new Laya.RigidBody(); groundBody.type = "static"; ground.addCompon...
来源: Laya2.0_示例 发布时间: 20241118
...LE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.createBox(); this.eventListener(); } createBox() { const width = 300, height = 20; const posx = Laya.Browser.width / 2, posy = Laya.Browser.height / 2; let box = this.box = new Laya.Sprite(); box.size(width + height * 2, width + height * 2); b...
来源: Laya2.0_示例 发布时间: 20241118
...ya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; this.createApe(); this.createTimerLine(); Laya.stage.on(Event.KEY_DOWN, this, this.keyDown); } createApe() { const Sprite = Laya.Sprite; this.target = new Sprite(); Laya.stage.addChild(this.target); this.t...
来源: Laya2.0_示例 发布时间: 20241118
... duration, Ease[list.selectedItem]); } createDurationCrontroller() { const Event = Laya.Event; let durationInput = this.createInputWidthLabel("Duration:", '2000', 400, 10); durationInput.on(Event.INPUT, this, function() { duration = parseInt(durationInput.text); }); } createInputWidthLabel(label, pr...
来源: Laya2.0_示例 发布时间: 20241118
...LE_FIXED_AUTO; Laya.Laya.stage.bgColor = "#232628"; this.Construct(); this.eventListener(); } Construct() { let ground = new Laya.Sprite(); Laya.Laya.stage.addChild(ground); let rigidbody = new Laya.RigidBody(); rigidbody.type = "static"; ground.addComponentIntance(rigidbody); let chainCollider = gr...
来源: Laya2.0_示例 发布时间: 20241118
...ya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; let vGap = 100; this.button1 = this.createButton("点我3秒之后 alpha - 0.5"); this.button1.x = (Laya.stage.width - this.button1.width) / 2; this.button1.y = (Laya.stage.height - this.button1.height - v...
来源: Laya2.0_示例 发布时间: 20241118
...ya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; var gap = 10; //创建一个Sprite充当音效播放按钮 let soundButton = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.s...
来源: Laya2.0_示例 发布时间: 20241118
...ayInput.type = "date"; passwordInput.type = "password"; Laya.stage.on(Laya.Event.RESIZE, this, this.fitDOMElements, [emailInput, birthdayInput, passwordInput]); } showLabel(label, x, y) { const Text = Laya.Text; let t = new Laya.Text(); t.height = this.rowHeight; t.valign = "middle"; t.fontSize = 15...
来源: Laya2.0_示例 发布时间: 20241118
...tX = 400, mStartY = 500, mCurrIndex = 0, mLabelSprite; class Skeleton_SpineEvent { constructor() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage, Stat = Laya.Stat, Sprite = Laya.Sprite; // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeig...
来源: Laya2.0_示例 发布时间: 20241118