• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0082 秒)

1071. sound manager在MOUSE_OVER事件中无法播放 [ 77%]

...   this.setup();         }          private setup(): void {             var gap: number = 10;              //创建一个Sprite充当音效播放按钮             var soundButton: Sprite = this.createButton("播放音效");    ...

来源: Laya_社区 发布时间: 20201203

1072. 性能测试-虫子(慎入) [ 77%]

..., 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

1073. 使用3D精灵 · LayaAir3.4 · 引擎文档 · LAYABOX [ 77%]

... 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

1074. load完成后能否获取到具体是哪个对象资源完成 [ 77%]

...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

1075. Sprite-显示图片 [ 77%]

...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

1076. Image加载完成后的图片大小重设问题 [ 77%]

...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

1077. 3d资源无法写入缓存 [ 77%]

...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

1078. LayaAir IDE 1.4.0新增功能 附加(扩展)脚本的使用 [ 77%]

...直接获取到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

1079. CPU优化方式(ActionScript-2D进阶篇(AS3)-性能优化) [ 77%]

...以使用局部变量来保存它: ```javascript private function foo():void {     var prop = target.prop;     // 使用prop     process1(prop);     process2(prop);     process3(prop); } ``` ### 二、计时器 ​ LayaAir提供两种计时器循环来执行代码块。 1....

来源: Laya2.0_文档 发布时间: 20210715

1080. TiledMap地图 · LayaAir3.4 · 引擎文档 · LAYABOX [ 77%]

... 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