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

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

1. 二次开发(TypeScript-LayaNative原生服务-LayaNative进阶) [ 100%]

...ue ? NO : YES]; } +(void)testAsyncCallback:(NSString*)json { //js thread NSError* error = nil; NSData* jsonData = [json dataUsingEncoding:NSUTF8StringEncoding]; NSDictionary* dict = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&error]; NSLog(@"OC: %@"...

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

2. 骨骼动画进阶(JavaScript-2D进阶篇(JS)-动画进阶) [ 89%]

... templet.on(Laya.Event.COMPLETE,this,parseComplete); templet.on(Laya.Event.ERROR,this,onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); function onError() { console.log("parse error"); } function parseComplete() { //创建第一个动画 var skeleton0; //从动画模板...

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

3. 骨骼动画进阶(TypeScript-2D进阶篇(TS)-动画进阶) [ 88%]

...Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); this.templet.loadAni("res/spine/goblins/goblins.sk"); } onError() { console.log("parse error"); } parseComplete() { //创建第一个动画 var skeleton0: Laya.Skeleton; //从动画模板创建动...

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

4. 骨骼动画进阶(ActionScript-2D进阶篇(AS3)-动画进阶) [ 87%]

...mplet(); templet.on(Event.COMPLETE, this, parseComplete); templet.on(Event.ERROR, this, onError); //加载动画文件 templet.loadAni("res/spine/goblins/goblins.sk"); } private function onError():void { trace("parse error"); } private function parseComplete():void { //创建第一个动画 var skel...

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

5. 用Geolocation获取地理位置信息(TypeScript-LayaAir基础篇(TS)-硬件设备相关) [ 86%]

...etCurrentPosition( Handler.create(this, onSuccess), Handler.create(this, onError) ); // 成功获取位置后触发 function onSuccess(info:GeolocationInfo):void { trace('经纬度: (' + info.longitude + '°, ' + info.latitude + '°),精确度:' + info.accuracy + 'm'); if(info.altitude != null) ...

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

6. 用Geolocation获取地理位置信息(JavaScript-LayaAir基础篇(JS)-硬件设备相关) [ 86%]

...etCurrentPosition( Handler.create(this, onSuccess), Handler.create(this, onError) ); // 成功获取位置后触发 function onSuccess(info:GeolocationInfo):void { trace('经纬度: (' + info.longitude + '°, ' + info.latitude + '°),精确度:' + info.accuracy + 'm'); if(info.altitude != null) ...

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

7. 用Geolocation获取地理位置信息(ActionScript-LayaAir基础篇(AS3)-硬件设备相关) [ 85%]

...etCurrentPosition( Handler.create(this, onSuccess), Handler.create(this, onError) ); // 成功获取位置后触发 function onSuccess(info:GeolocationInfo):void { trace('经纬度: (' + info.longitude + '°, ' + info.latitude + '°),精确度:' + info.accuracy + 'm'); if(info.altitude != null) ...

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

8. Spine适配版(JavaScript-LayaAir基础篇(JS)-动画基础) [ 73%]

...emplet.on(Event.COMPLETE, this, this.parseComplete); this.templet.on(Event.ERROR, this, this.onError) } private parseComplete(): void { this.skeleton = this.templet.buildArmature(); Laya.stage.addChild(this.skeleton); this.skeleton.pos(Browser.width / 2, Browser.height / 2 + 100); this.skeleton.scal...

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

9. 华为快游戏接入与发布调试指南(TypeScript-小游戏适配文档-华为快游戏) [ 73%]

...括console的log日志,以及报错日志。如果改为只是设置为error,则只显示报错日志,不会显示console日志。无论是error还是log都会在发布后,输出对应日志等级的相关输出信息,如果为off,则会不输出任何信息。 ![img](img/5.png) 关于...

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

10. 其他(TypeScript-LayaNative原生服务-LayaNative基础文档) [ 72%]

...异常(如网络不稳定),引擎会自动调用到window.onLayaInitError(error)函数,该函数默认在config.js中定义,代码如下: ```javascript window.onLayaInitError=function(e) { console.log("onLayaInitError error=" + e); alert("加载游戏失败,可能由于您的网络不...

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