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

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

201. 多个模块之间相互嵌套import,导致运行报错 [ 50%]

...t.Create(); cat.on('attack', function () { self.Change(); }); this.animals.push(cat); }   2019-02-26 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 karin666 相关问题 Layabox 2.0 bate5 运行编译之后 bun...

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

202. 源码List的一次代码错误 [ 50%]

...h - 1; i > -1; i--) { var item = this._cells[i]; item.removeSelf(); 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...

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

203. TiledMap,mapLayer追加精灵无法显示,已参考完已有问题解答,无法解决 [ 50%]

...ayer.addChild倒不是必须了,具体代码如下mapLayer._showGridList.push(sp);如果你用的ts的话还会报错说_showGridList不存在,需要在libs/LayaAir.d.ts里,找到class MapLayer extends Sprite这一行,在下面加上一行代码: class MapLayer extends Sprite { _mapData: A...

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

204. 关于资源版本号的问题咨询 [ 50%]

...ize.y, obj.sourceSize.w, obj.sourceSize.h)); loadedMap[url].url = url; map.push(url); } } delete _data.pics;    代码中斜线+加粗的代码则会去找版本号,并确定是否有需要添加的版本号,因为在ResourceManager的 public static function addVersionPrefix(originURL:String):...

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

205. 打包之后TEXT可以显示但是 加载其他资源时白屏 [ 50%]

...exactfit";  Laya.stage.screenMode = "horizontal";  var asset = []; asset.push({ url: ["../res/image/bg.png"], type: Laya.Loader.IMAGE }); Laya.loader.load(asset,Laya.Handler.create(this,graphicsImg)); function graphicsImg(){ var s = new laya.display.Sprite(); s.graphics.drawTexture(Laya.loader.get...

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

206. 引擎遮罩报错 [ 50%]

...ttItem: HeadItem = new HeadItem; attItem.x = i * this.OFF_X; this.itemList.push(attItem); this.itemSpr.addChild(attItem); } let maskSp:Laya.Sprite = new Laya.Sprite; maskSp.graphics.drawRect(0,0,760,140,'#ffffff'); this.itemSpr.mask = maskSp; 测试 在无mask的情况下不会报错 开启mask之...

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

207. Laya List给子元素添加事件后,滚动事件被劫持了 [ 49%]

...(413132131) }) //还是在handler中去渲染,都会滚动不了 txArray.push(list);} storeTxList.array = txArray;   Laya.stage.addChild(storeTxList);     悬赏找大神看问题 export default class StoreItem extends Laya.Box { constructor() { super(); this.size(195, 210); }  } 附件 : --> ...

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

208. 如何隐藏tiledMap中指定的GridSprite? [ 49%]

... *this._map.gridHeight; tSprite.initData(this._map); this._gridSpriteArray.push(tSprite); return tSprite; }这个根本是新建一个GridSprite,而不是返回现有的吧,这样貌似满足不了要求啊。请问这个问题要如何解决? 2016-12-28 添加评论 免费帖 --> 分享 微...

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

209. list中加的button不能接收点击事件 求一个list中加button的demo [ 49%]

...             itemList.pos(70,posY);             data.push(itemList);             posY = posY + 200;         }         let list = new Laya.List;         list.width = this.itemList.width;         list.height = this.itemList.height;     ...

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

210. 我给加载进来的UI界面中一个图片,添加点击更换图片的事件,需要点击两次才能更换图片 [ 49%]

...: function showui() { showui.super(this); var arr2 = new Array(); arr2.push(this.dimg); this.dimg.on(Laya.Event.CLICK, this,apeclick2, arr2); } function apeclick2(that) { console.log("apeclick sucess"); that.skin = "../img/5.jpg"; console.log(that); that.zOrder = 1; } 2017-02-18 1 0 分享 微博 ...

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