大约有 5 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0014 秒)
...niFly.pos(250, 100); Laya.stage.addChild(this.aniFly); //创建按钮 this.btn = new Sprite().size(205, 55); this.btn.graphics.drawRect(0, 0, this.btn.width, this.btn.height, "#057AFB"); this.txt = new Text(); this.txt.text = "销毁"; this.txt.pos(75, 15); this.txt.fontSize = 25; this.txt.color = "...
来源: Laya_示例 发布时间: 20241117
...L = Laya.WebGL; var DIALOG_WIDTH = 220; var DIALOG_HEIGHT = 275; var CLOSE_BTN_WIDTH = 43; var CLOSE_BTN_PADDING = 5; var assets; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.s...
来源: Laya_示例 发布时间: 20241117
...oid { for (var i: number = 0, len = this.skins.length; i < len; ++i) { var btn: Button = this.createButton(this.skins[i]); var x: number = i % this.COLUMNS * this.HORIZONTAL_SPACING + this.xOffset; var y: number = (i / this.COLUMNS | 0) * this.VERTICAL_SPACING + this.yOffset; btn.pos(x, y); } } priv...
来源: Laya_示例 发布时间: 20241117
...nt; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function onBtnClick() { //手动控制组件属性...
来源: Laya_示例 发布时间: 20241117
...e) { console.log("播放音效"); SoundManager.playSound("../../res/sounds/btn.mp3", 1, new Handler(this, onComplete)); } function onComplete() { console.log("播放完成"); } })();module laya { import Sprite = Laya.Sprite; import Stage = Laya.Stage; import Text = Laya.Text; import Event = Laya.Eve...
来源: Laya_示例 发布时间: 20241117