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

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

1. args.slice is not a function [ 100%]

...报错提示:Uncaught TypeError: undefined is not a function) trace(arr2.toString()); }兼容H5写法:public function funArgs(...args:Array):void{ var arr2:Array = args.slice(); trace(arr2.toString()); } 特殊情况:如果args不是唯一的参数,工具会自动识别。  原生例子: public...

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

2. args.slice is not a function [ 99%]

...报错提示:Uncaught TypeError: args.slice is not a function) trace(arr2.toString()); }[/i]  兼容H5写法:[i]public function funArgs(...args:Array):void { var arr2:Array = args.slice(); trace(arr2.toString()); } [/i] 特殊情况:    如果args不是唯一的参数,工具会自动识别。 ...

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

3. 关于laya图片资源缓存的问题 增量更新文件缓存 [ 92%]

...gh.obj(function (file, enc, cb) { staticVersion = JSON.parse(file.contents.toString()) let content = `export default ${file.contents.toString()}` file.contents = new Buffer(content) this.push(file) return cb() }); }()) .pipe(gulp.dest('.')) }) /** 图集资源添加时间戳 */ gulp.task('updata_atl...

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

4. LayaAir 寻路库,寻路路径错误 [ 92%]

...able, grid.nodes[1][2].walkable, grid.nodes[2][2].walkable);   trace(path.toString()); -------------------------------------输出----------------------------- true true true          0 0 0 false false true  -->   1 1 0 false false true        1 1 0 路径:0,0,  0,1, 1,2, 2,2 然...

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

5. 脚本引入时调用函数会出现 Cannot read property 'Init' of null [ 91%]

...sign; }  GameManager.js 中的调用 car.getComponent(Car).Init(carIndex.toString())  在进行回收检测的时候carIndex.toString() 提示 Cannot read property 'Init' of null   请问怎么处理 大佬们~~   我给参数去了,不传参数也会提示null   版本是:LayaAir IDE ...

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

6. 精灵添加名称 [ 90%]

... i < 4; i++ ){         sp=new Sprite();          sp.name = i.toString();         console.log(sp.name);         sp = project.drawsomething(20, 20+60*i, "#eeb9b3");         sp.on(Event.CLICK,this, onsp);         Laya.stage.addChild(sp);   }   private function o...

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

7. 资源回收的清理不干净的bug [ 90%]

...cene.addChild(sp.clone());                 ball.name = i.toString();             }             console.log("add finished: ", myscene.numChildren);                  for(var i=0; i<myscene.numChildren; i++){              ...

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

8. Laya的安卓二次开发主动调用js层,无法实现传回数据给js[ 89%]

... { e.printStackTrace(); } Log.d("Laya", "======准备返回参数 :"+obj.toString()); ExportJavaFunction.CallBackToJS(JSBridge.class, "authWxToLaya", obj.toString()); } }); 方式2: ConchJNI.RunJS("PlatformSDK.authWxToLaya(222)");   方式3: ExportJavaFunction.CallBackToJS(JSBridge.class, "au...

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

9. Laya.loader.load 教程代码出错 [ 85%]

...         var url:String = "../Res/Images/Role1/00011208_"+ index.toString() +".bmp";                 arr.push(url);             }             Laya.loader.load(arr,Handler.create(this,LoadComplated));         }         private function ...

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

10. ts加密md5码封装 [ 84%]

... little_endian(charCode: number) { return this.split(this.padding(charCode.toString(16), 8, "0", false), 2).reverse().join(""); } range(...args: number[]) { const start: number = args.length === 1 ? 0 : args[0]; const end: number = args.length === 2 ? args[1] : args[0] - 1; return Array.from(Array(e...

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