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

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

721. [laya2.4] 关于代码压缩后let变量重复定义问题 [ 66%]

...progress != null) { item.progress = value; var num = 0; for (var j = 0; j < items.length; j++) { var item1 = items[j]; if (item1) { let prog = item1.progress == undefined ? 0 : item1.progress; num += item1.size == undefined ? 0 : item1.size * prog; } } var v = num / totalSize; progress.runWith(v)...

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

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

...tion 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://127.0.0.1:37389/game/code.js:1:514598) at t.e.runWith (http://127.0.0.1:37389/game/code.js:1:11...

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

723. TS 如何调用第三方JS库 [ 66%]

...S类库文件放在bin/libs/ 下 然后在INDEX.HTML中也添加了标签 <script type="text/javascript" src="libs/zip/zip.js" loader="laya"></script> 但是在IDE中仍然无法调用,请问问题处在哪里。。。 2016-09-24 0 4 分享 微博 QZONE 微信 为什么被折叠? 0 个...

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

724. 最新版本绘制100x100个sprite ios不能显示 [ 66%]

...ew laya.display.Sprite(); // boxSp.cacheAsBitmap = true; for(var i = 0; i < this.MapRowNum; i++){ for(var j = 0; j < this.MapColNum; j++){ var box = new laya.display.Sprite(); box.graphics.drawRect(0, 0, 30, 30, null, "#e6e4ef", 1); box.x = i * 30; box.y = j * 30; boxSp.addChild(box); } } boxS...

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

725. 渲染队列排序问题,导致Alpha混合效果出错 [ 66%]

...  var camPos=camera._transform.position;         for (var i=0;i < validCount;i++){             var render=renders ;             if (camera._isLayerVisible(render._owner._layer)&& render._enable){                 Stat.frustumCulling++;   ...

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

726. 运行调试layaair后黑屏,用的js [ 66%]

...日志:"TypeError: Cannot read property 'call' of undefined at Function.<anonymous> (file:///Users/moos/Company/EmersonGame/bin/libs/laya.core.js:130:41) at new GameInfo (file:///Users/moos/Company/EmersonGame/src/GameInfo.js:4:18) at onLoaded (file:///Users/moos/Company/EmersonGame/src/Game...

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

727. 源码List的一次代码错误 [ 66%]

...elf(); arr.push(item); } this._cells.length = 0; } for (var k = startY; k < numY; k++) { for (var l = 0; l < numX; l++) { [b][i] if (arr && arr.length) { [/i][/b] cell = arr.pop(); } else { cell = this.createItem(); } cell.x = (this._isVertical ? l : k) * cellWidth - box.x; cell.y = (t...

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

728. 发布微信后无法触发mouse_up事件 [ 66%]

...er); } private mouseHandler(e:laya.events.Event):void { var touches: Array<any> = e.touches; if (touches) { for(let i=0;i<touches.length;i++){ let t =touches[i]; let nameIndex =e.touchId + "_" + i; console.log(nameIndex+":"+e.type); } } } 之能收到down和move! 2018-11-02 添加评论...

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

729. 下面这段unity碰撞代码如何用laya2.0物理引擎实现 [ 66%]

...impulseForce);     a.Normalize();     base.gameObject.GetComponent<Rigidbody2D>().AddForce(a * num, ForceMode2D.Impulse); }   private void AddPlayerForce(Collision2D collision, float playerStrong, float impulseForce) {     if (playerStrong == 0f || impulseForce ==...

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

730. 分享一个Graphics画圆角矩形的封装 [ 66%]

...ceof Laya.Graphics == false ){ return; }     let sideMin:number = width<=height ? width : height;     if(round<0){ round=0; }else if(round>sideMin/2){ round=sideMin/2; }     this.drawPath(x, y, [         ["moveTo", round, 0],         ["lineTo", width-round, 0],    ...

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