大约有 2,728 项符合查询结果, 库内数据总量为 30,782 项。 (搜索耗时: 0.0065 秒)
Laya_社区(1131) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya2.0_示例(109) Laya3.0_文档(87)
...s Animal implements EventEmiter { public sex: number = 0; public Create(): void {} public Attack(): void { this.emit('attack'); } } Manager.ts public CreateCat(): void { let self = this; let cat = new Cat(); cat.Create(); cat.on('attack', function () { self.Change(); }); this.animals.push(cat); } ...
来源: Laya_社区 发布时间: 20190226
下面这段unity碰撞代码如何用laya2.0物理引擎实现 private void OnCollisionEnter2D(Collision2D collision) { if (collision.gameObject.tag != Constants.TagPlayer) { return; } float num = 0f; foreach (ContactPoint2D contac...
来源: Laya_社区 发布时间: 20191028
... $method, $responseType, $headers); private function onHrCompleteHandler():void { if(this.completeHandler) { this.completeHandler.runWith(this.hr.data); } } private function onHrErrorHandler($error:String):void { if(this.errorHandler) { this.errorHandler.runWith($error); } } 其中就是这个$error...
来源: Laya_社区 发布时间: 20180528
...skins, Handler.create(this, this.onSkinLoaded)); } private onSkinLoaded(): void { var tabA: Tab = this.createTab(this.skins[0]); tabA.pos(40, 120); tabA.labelColors = "#000000,#d3d3d3,#333333"; var tabB: Tab = this.createTab(this.skins[1]); tabB.pos(40, 220); tabB.labelColors = "#FFFFFF,#8FB299,#FFF...
来源: Laya_示例 发布时间: 20241120
... = "#232628"; Stat.show(); this.startFun(); } private function startFun(): void { this.templet = new SpineTempletBinary(); this.templet.loadAni(this.aniPath); this.templet.on(Event.COMPLETE, this, this.parseComplete); this.templet.on(Event.ERROR, this, this.onError) } private function parseComplete(...
来源: Laya2.0_文档 发布时间: 20210715
...Returns EventDispatcher start start(throushold: number, interval: number): void Defined in laya/device/Shake.ts:43 开始响应设备摇晃。 Parameters throushold: number 响应的瞬时速度阈值,轻度摇晃的值约在5~10间。 interval: number Returns void stop stop(): void Defined in lay...
来源: Laya3.0_api 发布时间: 20231115
...lic function ArgsDemo() { funArgs(arr); } public function funArgs(...args):void { var arr2:Array = args.slice(); //(翻译成JS后会报错提示:Uncaught TypeError: args.slice is not a function) trace(arr2.toString()); }[/i] 兼容H5写法:[i]public function funArgs(...args:Array):void { var arr2...
来源: Laya_社区 发布时间: 20151204
...有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.vslider.pos(300,300);//滑动条位置 this.vslider.skin = "resources/vslider.png";//滑动条底图皮肤 this.vslider.value = 0.5; this.vslider.max = 50; this.vslider.min = 0; this.vslider.tick = 1; this.vslider...
来源: Laya3.0_文档 发布时间: 20241014
...有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.hslider.pos(300, 300);//滑动条位置 this.hslider.skin = "resources/hslider.png";//滑动条底图皮肤 this.hslider.value = 0.5; this.hslider.max = 50; this.hslider.min = 0; this.hslider.tick = 1; this.hslide...
来源: Laya3.0_文档 发布时间: 20241014
... 3.1 LayaFlash单行宏编译写法private function byteArrayReadIntTest():void { var byteArray:ByteArray = new ByteArray(); byteArray.writeInt(100); byteArray.position = 0; var value:int; /*[IF-FLASH]*/value = byteArray.readUnsignedInt(); //[IF-SCRIPT]value = byteArray.readInt(); }单行宏用法...
来源: Laya_社区 发布时间: 20151106