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

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

11. 这个怎么解决 [ 87%]

...hirdScriptError Unexpected token A in JSON at position 217;at api readFile success callback function SyntaxError: Unexpected token A in JSON at position 217 at JSON.parse (<anonymous>) at Function.MiniAdpter.getJson (http://127.0.0.1:38746/game/code.js:34118:15) at Function.MiniLoader.onReadNa...

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

12. LayaNative 2.8.0 加载的TTF字体不生效,附复现工程。 [ 87%]

...  Laya.loader.load("fonts/OPPOSANS-H.ttf", Laya.Handler.create(this, (success) => {             console.log("2.8.0 字体加载是否成功:", success);             Laya.Text.defaultFont = "OPPOSANS-H";         }), null, Laya.Loader.TTF) 附件 : --> la...

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

13. http 请求 once 的 回调参数,如何传递和接收? [ 85%]

...发送: var hr = new HttpRequest(); hr.once(Event.COMPLETE, this, http.success,[1,2,3]); hr.send("http://localhost:8082/hu_get",{}, "post","json",null);   回调方法: success:function (e,args) {     console.log(e); //此行可以得到响应内容     console.log(args);  //此行无法...

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

14. 微信小游戏截图 [ 85%]

...({ x: 0, y: 0, width: 1280, height: 720, destWidth: 1280, destHeight: 720, success:function(res:Object):void{ imagePath = res.tempFilePath;//这个就是截屏的图片地址,可以将图片生成到相册,也可以使用这个地址用来里显示 wx.saveImageToPhotosAlbum({ filePath:imagePath,...

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

15. 二次开发 异步回调没反应 [ 85%]

...发 异步回调没反应 ts: /**视频广告 */ public static showVideoAd(success: Laya.Handler, type: string): void { if (GameConfig.ins.isDev) { success.runWith(1); return; } var VGUtil = Laya.PlatformClass.createClass("com.szdn.game.fkzy.VGUtil"); VGUtil.callWithBack(back, "showVideoAd", type);...

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

16. layaAirIDE中如何使用wx等微信基础对象,ide版本1.7.19.1beta [ 84%]

...E中如何使用wx等微信基础对象,ide版本1.7.19.1beta wx.login({ success: function () { wx.getUserInfo({ success: function (res) { console.log('success', res) }, fail: function (res) { console.log("reject",res) } }) } }); 这段代码里的wx对象,报错如下 "wx is not defined" 2018-0...

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

17. 小游戏怎么截图 [ 84%]

...({ x: 0, y: 0, width: 1280, height: 720, destWidth: 1280, destHeight: 720, success:function(res:Object):void{ imagePath = res.tempFilePath; __JS__('wx').saveImageToPhotosAlbum({ filePath:imagePath, success:function(res:*):void{ trace("-----------saveImageToPhotosAlbum----------success----------"); t...

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

18. 打包后报错 Unexpected token in JSON at position 266 [ 83%]

...eThirdScriptError Unexpected token in JSON at position 266;at api readFile success callback function SyntaxError: Unexpected token in JSON at position 266     at JSON.parse (<anonymous>)     at Function.MiniAdpter.getJson (http://127.0.0.1:31158/game/code.js:21236:15)     at Function.Min...

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

19. 微信小游戏发布后,在开发者工具中报错, [ 83%]

...eThirdScriptError Unexpected token in JSON at position 787;at api readFile success callback function SyntaxError: Unexpected token in JSON at position 787 at JSON.parse (<anonymous>) at Function.e.getJson (http://127.0.0.1:37389/game/code.js:1:461434) at Function.e.onReadNativeCallBack (http:/...

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

20. layaAirIDE中如何使用wx等微信基础对象,ide版本1.7.19.1beta [ 83%]

...E中如何使用wx等微信基础对象,ide版本1.7.19.1beta wx.login({ success: function () { wx.getUserInfo({ success: function (res) { console.log('success', res) }, fail: function (res) { console.log("reject",res) } }) } }); 这段代码里的wx对象,报错如下 "wx is not defined" 2018-0...

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