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

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

21. Laya.Resource.destroyUnusedResources导致界面变形 [ 58%]

...UnusedResources。 核心代码: private onBtnClick(e:Laya.Event):void { switch(e.target) { case this.btn1: Laya.Scene.open("ui/p1/Page1.scene", false); break; case this.btn2: Laya.Scene.close("ui/p1/Page1.scene"); break; case this.btn3: Laya.Resource.destroyUnusedResources(); break; } }问题:...

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

22. 各位大佬,帮我看看 tiledMap 中获取不到自定义属性 [ 58%]

...ta(tileX, tileY); // console.log(data) // console.log(Laya.Keyboard.RIGHT) switch (e.keyCode) { //右边 case 39: { this.player.x += 16 break; } case 37: { //左边 this.player.x -= 16 break; } case 38: { //上 this.player.y -= 16  break; } case 40: { //下 this.player.y += 16 break; } } var mapLay...

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

23. laya拖拽在部分机型(一部XR)StageX不对 [ 58%]

...); //鼠标yi'dong private onMouseEvent(e: Laya.Event): void {         switch (e.type) { case Laya.Event.MOUSE_MOVE:       this.drag.x = e.stageX;       this.drag.y = e.stageY;       console.log(e.stageY, Laya.stage.mouseY, this.drag.y, "aaaaa")       break; } }    视频结尾的...

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

24. Text的中划线(删除线) [ 57%]

...    var lineWidth=this._lineWidths[lineIndex];             switch (align){                 case 'center':                     x-=lineWidth / 2;                     break ;                 case 'right':      ...

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

25. 向官方反映1.75引擎库后 事件执行 发生的bug [ 56%]

...e')this._prePoint.x=this._prePoint.y=-1000000;                 switch (evt.type){                     case 'mousedown':                         this._touchIDs[0]=this._id++;                         if (!MouseManager._isTouchRespond){  ...

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

26. 关于适配noborder模式(个人适配分享及建议) [ 55%]

...tage.scaleMode != "noscale") { scaleY = divH / desH; scaleX = divW / desW; switch (Laya.stage.scaleMode) { case "noborder": if (scaleX > scaleY) { scaleY = scaleX; } else { scaleX = scaleY; } break; case "showall": if (scaleX < scaleY) { scaleY = scaleX; } else { scaleX = scaleY; } break; case...

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

27. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 53%]

...):void {             if (screenPos) {                 switch (_map.orientation) {                 case TiledMap.ORIENTATION_ISOMETRIC:                      screenPos.x = _map.width / 2 - (tileY - tileX) * _tileWidthHalf;                  ...

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

28. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 52%]

... 更新岛 _proto.update = function(target){ var obj = {}; // 解析target switch (target.type) { case 1: obj.type = "mountain"; break; case 2: obj.type = "statue"; break; case 3: obj.type = "tower"; break; case 4: obj.type = "angel"; break; case 5: obj.type = "aeroboat"; break; default: alert("网...

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

29. 关于缓动函数from的一些问题记录 [ 47%]

...onsole.log("update"); var c = Math.floor(Math.random()*4); console.log(c); switch(c) { case 0:text.color='red';break; case 1:text.color="blue";break; case 2:text.color ='black';break; case 3:text.color = 'green';break; case 4:text.color = "yellow";break; } console.log(text.color); } ```注意Props...

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

30. 分享,扩展Laya.Text组件实现简单的富文本 [ 45%]

...awUnderline(align, x, y, lineIndex) { var lineWidth = this.underLineWidth; switch (align) { case 'center': x -= lineWidth / 2; break; case 'right': x -= lineWidth; break; case 'left': default: break; } y += this._charSize.height; this._graphics.drawLine(x, y, x + lineWidth, y, this.underColor || thi...

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