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

大约有 418 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0043 秒)

1. 引擎 TiledMap 居然不支持图块翻转 [ 100%]

...      }                 var tAniSprite;                 for (var i = 0; i < this.aniSpriteArray.length; i++) {                     tAniSprite = this.aniSpriteArray[i];                     tAniSprite.show();                 }             }    ...

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

2. 分享个用美术资源做位图文本的方法。。。 [ 98%]

...nt(v: string){ if(!v || v == ""){ return; } // 移除上次绘制的内容 for(var k=0;k<this.numChildren;k++){ Laya.Pool.recover("sprite",this._childs[k]); } this.removeChildren(); var charTotal: number = v.length; var charSps: any = ; for(var i=0;i<charTotal;i++){ var targetChar = v.substr(i...

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

3. 其他引擎的Demo-Example_05 [ 97%]

...tion setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (points1[i] tpoint2[i]) { tpoint2[i] =...

来源: Laya_示例 发布时间: 20240930

4. 其他引擎的Demo-Example_05 [ 97%]

...tion setup() { Laya.stage.on(Event.RESIZE, this, onResize); makeObject(0); for (var i = 0; i objs) { current = 0; } makeObject(current); } function makeObject(t) { var xd; var i; switch (t) { case 0: for (i = 0; i tpoint1[i]) { tpoint1[i] = tpoint1[i] + 1; } if (points1[i] tpoint2[i]) { tpoint2[i] =...

来源: Laya2.0_示例 发布时间: 20240930

5. LayaAir编译器错之for_in [ 97%]

LayaAir编译器错之for_in 编译器会新一个变$each_i来代替i 此情况下尽量写成以下方式 ------------------as------------------     for (var i:String in Loader.loadedMap)             {                 var t:Texture = null;                 if(Lo...

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

6. 性能测试-骨骼 [ 97%]

...Factory.parseData(tTexture, arraybuffer, 10); } function parseComplete() { for (var i = 0; i = tAnimNum) { mActionIndex = 0; } for (var i = 0, n = mAnimationArray.length; i = []; private mFactory: Templet; constructor() { this.mSpacingX = Browser.width / this.colCount; this.mSpacingY = Browser.heigh...

来源: Laya_示例 发布时间: 20240930

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

...all.lh", Laya.Handler.create(this, function(sp){             for(var i=0; i<3; i++){                 var ball = myscene.addChild(sp.clone());                 ball.name = i.toString();             }             console.l...

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

8. 多个button如何区分 [ 96%]

多个button如何区分 通过 for 循环 加入多个button 添加事件 this.emojiBut1.on(Laya.Event.CLICK,this,this.onEmojiBut1Click); 多个button 如何区分 点击的哪一个button  可以设置tag吗 或者通过监听事件透传?   附件 : --> 2017-04-25 添加评论 免费帖 --> ...

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

9. 输入设备-贪吃蛇(重力感应) [ 96%]

... 游戏开始时有一个食物 produceFood(); })() function initSnake() { for (var i = 0; i 0) { var prevSeg = segments[segments.length - 1]; seg.rotation = prevSeg.rotation; var point = seg.getPinPosition(); seg.x = prevSeg.x - point.x; seg.y = prevSeg.y - point.y; } segments.push(seg); } function...

来源: Laya_示例 发布时间: 20240930

10. js继承模式 [ 96%]

...(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProperty(p)) && (d[p] = b[p]); } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var BackGround = (function(...

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