大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0082 秒)
Laya_社区(1162) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya3.0_文档(117) Laya2.0_示例(109)
... this.setup(); } private setup(): void { var gap: number = 10; //创建一个Sprite充当音效播放按钮 var soundButton: Sprite = this.createButton("播放音效"); ...
来源: Laya_社区 发布时间: 20201203
..., Handler.create(this, this.onTextureLoaded)); } private onTextureLoaded():void { this.maggotTexture = Laya.loader.getRes(this.texturePath); this.initMaggots(); Laya.timer.frameLoop(1, this, this.animate); } private initMaggots():void { var maggotContainer:Sprite; for (var i:number = 0; i wb.x + wb....
来源: Laya_示例 发布时间: 20260303
... constructor() { super(); } /** * @private */ protected _updateRotation(): void { if (Math.abs(this.yawPitchRoll.y) < 1.50) { Laya.Quaternion.createFromYawPitchRoll(this.yawPitchRoll.x, this.yawPitchRoll.y, this.yawPitchRoll.z, this.tempRotationZ); this.tempRotationZ.cloneTo(this.camera.transform...
来源: Laya3.0_文档 发布时间: 20251010
...s/LayaScene_H5TestScene/H5TestScene.ls"); private LoadAsset(path: string): void { Laya.loader.create(path, Laya.Handler.create(this, this.OnAssetComplete)); } private OnAssetComplete(): void { console.log("on asset complete:"); } 我想在OnAssetComplete内知道是哪个资源被回调了,请问...
来源: Laya_社区 发布时间: 20180316
...all"; Laya.stage.bgColor = "#232628"; this.showApe(); } private showApe(): void { // 方法1:使用loadImage var ape: Sprite = new Sprite(); Laya.stage.addChild(ape); ape.loadImage("res/apes/monkey3.png"); // 方法2:使用drawTexture Laya.loader.load("res/apes/monkey2.png", Handler.create(this,...
来源: Laya2.0_示例 发布时间: 20260303
...r() { super(); init(); } public init ():void { this.bg_img.loadImage("ui/bg.jpg",0,0,Laya.stage.width,Laya.stage.height,Laya.Handler.create(this,this.onComplete)); Laya.stage.on(Laya.Event.RESIZE,this,this.onResize); } onCo...
来源: Laya_社区 发布时间: 20161116
...File=function(readyUrl,md5Name,isAdd,encoding,callBack,fileSize){ (isAdd===void 0)&& (isAdd=true); (encoding===void 0)&& (encoding=""); (fileSize===void 0)&& (fileSize=0); var fileurlkey=readyUrl; if(MiniFileMgr.filesListObj['fileUsedSize']==null) MiniFileMgr.filesListObj['fi...
来源: Laya_社区 发布时间: 20190919
...直接获取到Button组件的实例 public function set owner(v:Sprite):void { _owner = v; //由于时序问题,我们需要在此处添加逻辑代码,确保_owner不为null if(_isScal&&_owner) { _owner.on(Event.MOUSE_DOWN,this,onDown); } else { return; } } public function get isScale(...
来源: Laya_社区 发布时间: 20161014
...以使用局部变量来保存它: ```javascript private function foo():void { var prop = target.prop; // 使用prop process1(prop); process2(prop); process3(prop); } ``` ### 二、计时器 LayaAir提供两种计时器循环来执行代码块。 1....
来源: Laya2.0_文档 发布时间: 20210715
... this.completeHandler)); } //添加地图到Scene2D下 private onLoaded(): void { this.tMap.mapSprite().removeSelf(); this.owner.addChild(this.tMap.mapSprite()); } //地图加载完成的回调 private completeHandler(e: any = null): void { this.onLoaded(); } } 编译运行代码,效果如图3-3...
来源: Laya3.0_文档 发布时间: 20251010