大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0081 秒)
Laya_社区(1162) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya3.0_文档(117) Laya2.0_示例(109)
...知是不是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
...#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
...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
...建? 比如一个主类: 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
...; 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
...器变种的信息,分别编译出一个Shader) ```typescript compile(): void; ``` **预编译的基本原理:** ShaderVariantCollection记录了所有的ShaderVariant着色器变种,全局有一个Shader3D.debugShaderVariantCollection负责作为ShaderVariantCollection进行记录,只有通...
来源: Laya2.0_文档 发布时间: 20210714
...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
...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
...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
...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