大约有 2,727 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0066 秒)
Laya_社区(1131) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya2.0_示例(109) Laya3.0_文档(86)
...aya.Sprite(); Laya.stage.addChild(this.qrcodeSp); } private clickHandler():void{ var url:string = this.qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个延时在获取。 this.qrcodeSp.loadImage(url,0,0,100,100); } } new Main; ``` 编译运行上面的代码...
来源: Laya2.0_文档 发布时间: 20210715
...this, this.onColorPickerSkinLoaded)); } private onColorPickerSkinLoaded(): void { var colorPicker: ColorPicker = new ColorPicker(); colorPicker.selectedColor = "#ff0033"; colorPicker.skin = this.skin; colorPicker.pos(100, 100); colorPicker.changeHandler = new Handler(this, this.onChangeColor, [color...
来源: Laya2.0_示例 发布时间: 20241119
...gClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { this.closeBtn.on(Laya.Event.CLICK, this, () => { this.close(); }); } } 1.3.3 关联场景 设置好弹窗之后,需要用代码将Dialog与所需要用到该Dialog的场景管关联起来。回到初始场景Scene...
来源: Laya3.0_文档 发布时间: 20241014
...ya.stage.bgColor = "#232628"; this.demonstrate(); } private demonstrate(): void { for (var i: number = 0; i < 10; i++) { Laya.timer.callLater(this, this.onCallLater); } } private onCallLater(): void { console.log("onCallLater triggered"); var text: Text = new Text(); text.font = "SimHei"; text.fontS...
来源: Laya_示例 发布时间: 20241119
...e(this, this.onAssetLoaded2)); } private onAssetLoaded1(texture: Texture): void { // 使用texture } private onAssetLoaded2(): void { var pic1: Texture = Loader.getRes("res/apes/monkey0.png"); var pic2: Texture = Loader.getRes("res/apes/monkey1.png"); var pic3: Texture = Loader.getRes("res/apes/monk...
来源: Laya2.0_示例 发布时间: 20241119
...his.apePath, Handler.create(this, this.createApe)); } private createApe(): void { var ape: Sprite = new Sprite(); ape.loadImage(this.apePath); ape.x = (Laya.stage.width - ape.width) / 2; ape.y = (Laya.stage.height - ape.height) / 2; Laya.stage.addChild(ape); this.applayFilter(ape); } private applayF...
来源: Laya_示例 发布时间: 20241119
...快,请问是什么问题? private mouseMove(state: Laya.RenderState):void{ // console.log(mX + "移动"); // console.log(this.lastMouseX + "按下"); let mX:number = Laya.stage.mouseX; let mY:number = Laya.stage.mouseY; let vec:Laya.Vector3 ; if(this.isDown){ if(this.lastMouseX - mX > 0) { v...
来源: Laya_社区 发布时间: 20180113
...这里绑定了该函数的作用域。 2.1 init函数: private init(): void { this.mapDiv = Laya.Browser.createElement("div"); Laya.Browser.document.body.appendChild(this.mapDiv); // 适应窗口尺寸 this.refit(); Laya.stage.on(Laya.Event.RESIZE, this, this.refit); // 初始化地图 this.map =...
来源: Laya3.0_文档 发布时间: 20241014
...不行 //加载动画 load(aniUrl: string,emoji?:string,complete?:Handler):void{ if (emoji) { this.emoji=emoji; } if (complete) { this.completeHandler = complete; } this.aniUrl = aniUrl; this.templet = new Templet(); this.templet.on(Event.COMPLETE, this, this.parseComplete); // this.templet.on(Event...
来源: Laya_社区 发布时间: 20180824
...数的作用域。 ##### 2.1 init函数: ```typescript private init(): void { this.mapDiv = Laya.Browser.createElement("div"); Laya.Browser.document.body.appendChild(this.mapDiv); // 适应窗口尺寸 this.refit(); Laya.stage.on(Laya.Event.RESIZE, this, this.refit); // 初始化地图 this.ma...
来源: Laya2.0_文档 发布时间: 20210714