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

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

301. 创建图集的问题 [ 71%]

...ndler.create(this, onLoading, null, false)); // 使用图集 var arr = []; for(var i=1; i<=12; i++){ arr.push('nvhaidaomao/nvhaidaomao_down'+i+'.png'); } Animation.createFrames(arr, 'plane_fly'); // 运行游戏报错 Failed to load resource:net::ERR_FILE_NOT_FOUND [error]failed to load : d:/lt-g...

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

302. 内存优化方式(TypeScript-2D进阶篇(TS)-性能优化) [ 71%]

...间隔后 if (this.createTime >= 100) { //每200帧间隔创建30个雪花 for (var i: number = 0; i 640+20||img1.scaleX 在一些特殊情况我们需要注意`Laya.Hanlder.create()`的使用方式,我们仔细看图3中的`Laya.Hanlder.create()`方法说明。 从对象池内创建一个Handler...

来源: Laya2.0_文档 发布时间: 20210715

303. 为什么laya的Button渲染逻辑顺序是先渲染,再获取素材切片? [ 71%]

... this._sources=; if (this._stateNum===1){ this._sources.push(img); }else { for (var i=0;i < this._stateNum;i++){ this._sources.push(Texture.createFromTexture(img,0,height *i,width,height)); } } AutoBitmap.setCache(key,this._sources); } if (this._autoSize){ this._bitmap.width=this._width || width;...

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

304. httpRequest send返回Request failed Status:0 [ 71%]

...unction () { function GameMain() { //初始化引擎 Laya.init(1136, 640); for (var i = 0; i < 4; i++) { var sp = new Laya.Sprite(); var xhr = new Laya.HttpRequest(); var url = "http://thirdqq.qlogo.cn/g%3Fb% ... 3B%3B xhr.once(Laya.Event.COMPLETE, this, this.completeHandler, [url, 1]); xhr.once(...

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

305. LayaBox 出错啦,请把此信息截图给研发商 SimpleSingletonList [ 70%]

...个BUG,修复如下: laya.d3.js -> SimpleSingletonList.Clear -> for (var i = 0, n = this.length; i < n; i++) 引擎代码 i没有赋初值,导致 i<n永远为false. 2020-03-21 0 0 分享 微博 QZONE 微信 沃德提安呐·郝舒艾 赞同来自: 引擎开发成员水平堪忧! ...

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

306. 碰撞检测,intersects方法造成sprite消失 [ 70%]

碰撞检测,intersects方法造成sprite消失 //碰撞检测 for(var i:number=0;i<this.roleBox.numChildren;i++){ let role:Laya.Animation=this.roleBox.getChildAt(i) as Laya.Animation // 只要去掉下面这行代码就不会消失 let isIntersect:boolean=this.home.player.getBounds().intersec...

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

307. 【简单跑酷--JS版】---Lv.5 玩家踩地板 [ 70%]

...; } _proto.onLoop = function(){ // 检测人物是否踩在地板上面了 for(var i = this.mapFloor.numChildren - 1; i > -1; i--){ var floor = this.mapFloor.getChildAt(i); //检测人物是否踩在地板上面了 if(floor.checkHit(this.player.x, this.player.y)){ //人物如果踩到地板了 ...

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

308. list图片路径没问题.为什么图片就是不显示.啊啊啊也,求解答 [ 70%]

...EquipArr = BagData.ins.getItemByType(PackType.item_); //遍历装备列表 for(var i:int = 0; i < allEquipArr.length; i++) { var itemlo:ItemConfigLO = BagData.ins.getItemConfigLOById(allEquipArr[i].baseId.toString()); //装备类型分类再显示 if(itemlo) { data.push({itemImg:""+item...

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

309. matter中有没有类似于unity中的OnCollision碰撞检测函数呀,用js怎么写 [ 70%]

... console.log("碰撞了..");  var home = _gamePage._mainPage._playPage;  for(var i = 0; i < event.pairs.length; i++) {  var pair = event.pairs[i];  if(!(pair.bodyA.label === 'gun' || pair.bodyB.label == "gun")) continue;  var other;  if (pair.bodyA.label === 'gun') { other = pair.bodyB; } e...

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

310. List中放TextInput,当list滚动的时候,复用会有问题,input中的内容会乱,尤其有输入框focus的情况下 [ 70%]

...ge.addChild(list); // 设置数据项为对应图片的路径 var data = ; for (var i = 0; i < 100; ++i) { data.push({ lb: i, value: i }); // data.push("../../res/ui/listskins/1.jpg"); // data.push("../../res/ui/listskins/2.jpg"); // data.push("../../res/ui/listskins/3.jpg"); // data.push("../../...

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