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

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

71. Laya.Pool.getItemByClass 闪退 [ 85%]

...s 闪退 var fish:CFFish = Laya.Pool.getItemByClass(type,CFFish) as CFFish console.log(fish) fish.visible = true fish.init(type) 调用init方法时候闪退,错误信息是 "fish.init is not a function" "TypeError: fish.init is not a function at Function.CFSprite.reusableFishWithType (file:///Use...

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

72. Laya.loader.create中的progress回调好像不准确? [ 84%]

...n/yueren.ls", Laya.Handler.create(this, function () { //complete func console.log("Scene loaded"); isLoaded = true; }), Laya.Handler.create(this, function (pro) { if (debug) console.log("Loading progresss : " + pro); }, null, false), Laya.Scene); Monica • 2018-03-21 11:01 ...

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

73. 排坑:Laya.HttpRequest()无效 [ 84%]

...码并打印到控制台。然而,什么也获取不到 下面是代码 console.log("开始测试"); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(Event.PROGRESS,...

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

74. 微信小游戏iOS平台下的Laya.timer.delta在设置Laya.timer.scale=0后会异常暴增 [ 84%]

....timer.delta累计游戏玩了多长时间 下面是代码: onHide():void{ console.log("onhide|aaa|" + Laya.timer.delta); Laya.timer.scale = 0; console.log("Laya.timer.scale=" + Laya.timer.scale); } onShow():void{ console.log("onshow|bbb|111|" + Laya.timer.delta); Laya.timer.scale = 1; console.log("...

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

75. 2.4 生命周期触发多次,连constructor都执行了两次 [ 84%]

...命周期触发多次,连constructor都执行了两次 onAwake():void { console.log("onAwake"); } onStart():void { console.log("onStart"); } onEnable():void { console.log("onEnable"); } onDisable():void { console.log("onDisable"); } 附件 : --> 2019-12-09 添加评论 免费帖 --> 分享 微博 ...

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

76. Laya.HttpRequest 没有调用回调方法? [ 84%]

...("https://www.baidu.com/","","get","text"); function processHandler(data){ console.log(data); console.log("1111"); } function errorHandler(data){ console.log("2222"); } function completeHandler(e){ console.log("3333"); } 2018-08-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...

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

77. [LayaAir 2.0] 如何获取碰撞点坐标? [ 83%]

...个参数: onTriggerEnter(other: any, self: any, contact: any): void { console.log(other); //被碰撞的对象 console.log(self); //自己 console.log(contact); //连接点对象, contact.getHitInfo(); //这里有碰撞点的信息 }   官方文档不全,或者说没法说的那么仔细,...

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

78. iOS wkWebView [ 83%]

...都没问题,求大神给解答下啊!     private connect(): void { console.log("connect...."); this.hr = new Laya.HttpRequest(); this.hr.once(Laya.Event.PROGRESS, this, this.onHttpRequestProgress); this.hr.once(Laya.Event.COMPLETE, this, this.onHttpRequestComplete); this.hr.once(Laya.Event.E...

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

79. 横竖屏切换,此引擎渲染有BUG [ 83%]

...= Laya.Browser.clientWidth; this.oldheight= Laya.Browser.clientHeight; }  console.log("设置横屏" + isFirst); if (isFirst) Laya3D.init(1280, 720, true); else Laya.stage.width = 1280; Laya.stage.height = 720; //Laya.stage.scaleMode = Laya.Stage.SCALE_FIXED_WIDTH; Laya.stage.scaleMode = Laya.Stage...

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

80. 发布时勾选压缩js后,gulp uglify生成的sourcemap在哪里 [ 83%]

...cemaps.write(releaseDir + '/../sourcemaps')) .on('error', function (err) { console.warn(err.toString()); }) .pipe(gulp.dest(releaseDir)); } }); 可以看到laya是用uglify工具压缩的js 2、生成js对应的 .js.map文件 .js.map :map文件是js文件压缩后,文件的变量名替换对应...

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