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

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

1031. [LayaAirIDE3]Laya.loader.on(Event.ERROR, this, this.onError) 无法侦听到加载资源失败 [ 78%]

...知是不是3的bug还是需要用其他方法来实现。   onAwake(): void     {         // 无加载失败重试         Laya.loader.retryNum = 0;          var urls: any = ["do not exist", "resources/res/fighter/fighter.png", "resources/res/legend/map.jpg"];         Laya.loade...

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

1032. 微信关系链:LayaAir引擎针对微信小游戏好友关系链实现方案 [ 78%]

...#ffffff"; if (Browser.onMiniGame) { Laya.timer.once(1000, this, function():void{ //设置共享画布大小 __JS__('sharedCanvas').width = Laya.stage.width; __JS__('sharedCanvas').height = Laya.stage.height; //主域往子域透传消息 __JS__('wx').postMessage({type:"resizeShared",url:"",data:{wid...

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

1033. 继承Scene没有onEnable [ 78%]

...constructor(){         super();     }     public onAwake():void{         console.log(1111);     } }   2.继承Sprite 执行后会有onAwake         let t = new tt();         Laya.Scene.root.addChild(t);     } } //激活启动类 new Main();  class t...

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

1034. AS中的回调函数为什么只能用Handler创建? [ 78%]

...建? 比如一个主类: private var score:int; public function main():void {  new class(callback); } private function callback(num:int):void {   this.score = num;   var tmp:int = this.score;   trace(tmp); }     另外一个类:class.as 里面有个方法   public function class(callbac...

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

1035. Sprite-旋转缩放 [ 78%]

...; Laya.stage.bgColor = "#232628"; this.createApe(); } private createApe(): void { this.ape = new Sprite(); this.ape.loadImage("res/apes/monkey2.png"); Laya.stage.addChild(this.ape); this.ape.pivot(55, 72); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; Laya.timer.frameLoop(1,...

来源: Laya2.0_示例 发布时间: 20260303

1036. Shader预编译(TypeScript-3D基础(TS)-LayaAir3D之Shader) [ 78%]

...器变种的信息,分别编译出一个Shader) ```typescript compile(): void; ``` **预编译的基本原理:** ShaderVariantCollection记录了所有的ShaderVariant着色器变种,全局有一个Shader3D.debugShaderVariantCollection负责作为ShaderVariantCollection进行记录,只有通...

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

1037. 请大家帮助优化一下这个抛物线的代码 [ 78%]

...ate body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.loadImage("war/ball.png"); this.body.pivot(12,12); } this.addChild(this.body); Laya.timer.frameLoop(1,this,this.animate); } private animate(...

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

1038. 滤镜-模糊滤镜 [ 78%]

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

来源: Laya2.0_示例 发布时间: 20260303

1039. laya.d3.core.particleShuriKen.ShurikenParticleMaterial [ 78%]

...enParticleMaterial()ShurikenParticleMaterial _addReference(count:int = 1):void[override] BaseMaterial _parse(data:*, propertyParams:Object = null, constructParams:Array = null):BaseMaterial[static] BaseMaterial _removeReference(count:int = 1):void[override] BaseMaterial clone():* 克隆。 BaseM...

来源: Laya2.0_api 发布时间: 20190513

1040. 图集资源clearRes清除之后下次再用到load时加载失败 [ 78%]

...s清除之后下次再用到load时加载失败 public LoadImg(url:string):void { Laya.loader.load([{ url:url, type: Laya.Loader.ATLAS }],Laya.Handler.create(this,this.Loa,null)); } private Loa():void { console.log("在又有意义有意义有意义有意义有意义有意义有意义有意义"); } ...

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