大约有 573 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0058 秒)
Laya_社区(347) Laya3.0_api(60) Laya2.0_文档(52) Laya_示例(41) Laya2.0_示例(40) Laya3.0_文档(29) laya_api(2) Laya2.0_api(2)
... Laya.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Event.CLICK, this, onBtnClick); this.btn2.on(Event.CLICK, this, onBtn2Click); function onBtnClick() { //手动控制组...
来源: Laya2.0_示例 发布时间: 20200319
...ui_imgs/img_10103.png"; fish.scoreItem.sizeGrid = '0,10,0,10'; var price = this.getFishVal('10001', 3); var length = String(price).length; var w = length * 16 + 15 + 40; fish.scoreItem.width = w; fish.scoreItem.x = fish.getBox().x - fish.scoreItem.width/2; fish.scoreItem.y = fish.getBox().y - fish.s...
来源: Laya_社区 发布时间: 20180517
...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createTexts(); } private createTexts(): void { this.createText('left', 1, null, 100, 10); this.createText('center', 2, "#00BFFF", 155, 150); this.createText('right', 3, "#FF7F50", 210, 290); } private createText(align: s...
来源: Laya_示例 发布时间: 20251130
...= (function(_super){ function GameInfo(){ GameInfo.super(this); this.pauseBtn.on(Laya.Event.CLICK, this, this.onPauseBtnClick); this.reset(); } Laya.class(GameInfo, "GameInfo", _super); var _proto = GameInfo.prototype; _proto.reset = ...
来源: Laya_社区 发布时间: 20170416
...nction setup() { listenKeyboard(); createLogger(); Laya.timer.frameLoop(1, this, keyboardInspector); } function listenKeyboard() { keyDownList = []; //添加键盘按下事件,一直按着某按键则会不断触发 Laya.stage.on(Event.KEY_DOWN, this, onKeyDown); //添加键盘抬起事件 Laya.stag...
来源: Laya_示例 发布时间: 20251130
... txt.color = "#ffffff"; Laya.stage.addChild(txt); txt.on(Event.MOUSE_DOWN, this, startScrollText); } /* 开始滚动文本 */ private function startScrollText(e:Event):void { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this...
来源: Laya2.0_文档 发布时间: 20210715
...19-05-20 15:11 浏览: 2212 关注: 3 人 Supermang42 • 2018-08-10 14:17 this.sx.text = " xxx "; Supermang42 • 2018-08-10 14:17 this ← 是你的UI Lancer • 2018-08-10 17:04 @Supermang42:我添加Laya.stage.addChild(this)之后,text才被赋值,但是把先前addChild()的内容...
来源: Laya_社区 发布时间: 20180810
...命令按钮 var btnDraw:Sprite=CreateBtn(100,400); btnDraw.on(Event.CLICK,this,onClickBtnDraw); } //创建按钮 private function CreateBtn(xx:int,yy:int):Sprite { var btn:Sprite=new Sprite(); btn.graphics.drawRect(0,0,200,50,"#FF0000"); btn.pos(100,400); var text:Text=new Text(); text.text="Draw";...
来源: Laya_社区 发布时间: 20170822
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.hscroll.skin = "atlas/comp/hscroll.png";//滚动条皮肤 this.hscroll.width = 300;//滚动条的宽度 this.hscroll.pos(300, 300);//滚动条的位置 this.hscroll.min = 0;//滑块的最小滚动位置 this.hscroll.max = ...
来源: Laya3.0_文档 发布时间: 20251010
...和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.vscroll.skin = "atlas/comp/vscroll.png";//滚动条皮肤 this.vscroll.width = 300;//滚动条的宽度 this.vscroll.pos(300, 300);//滚动条的位置 this.vscroll.min = 0;//滑块的最小滚动位置 this.vscroll.max = ...
来源: Laya3.0_文档 发布时间: 20251010