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

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

21. laya.map.TiledMap_API3.0 [ 76%]

... 销毁地图 Returns void getLayerByIndex getLayerByIndex(index: number): MapLayer Defined in laya/map/TiledMap.ts:1395 通过索引得MapLayer Parameters index: number 要找的层索引 Returns MapLayer getLayerByName getLayerByName(layerName: string): MapLayer Defined in laya/map/TiledMap.ts:137...

来源: Laya3.0_api 发布时间: 20231115

22. laya.map.MapLayer_API3.0 [ 75%]

...lic/Protected All Inherited Externals Only exported Menu Globals "laya/map/MapLayer" MapLayer Class MapLayer 地图支持多层渲染(例如,地表层,植被层,建筑层等) 本类就是层级类 author ... Hierarchy Sprite MapLayer Index Constructors constructor Properties _extra _ownGra...

来源: Laya3.0_api 发布时间: 20231115

23. 加载TiledMap 不显示 [ 73%]

...示 import Sprite = Laya.Sprite; import Stage = Laya.Stage; import MapLayer = Laya.MapLayer; import TiledMap = Laya.TiledMap; import Point = Laya.Point; import Rectangle = Laya.Rectangle; import Handler = Laya.Handler; import WebGL = Laya.WebGL;  export class TiledMap_Isom...

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

24. 如何在Tiled Map的对象层中添加角色 [ 72%]

...并显示,现在我想添加一个角色到对象层中。我使用 var mapLayer = this.tiledMap.getLayerByName("hero"); 次方法可以获取到对象层,然后创建了一个精灵并将角色的图片信息放在了精灵里面, 分别使用了mapLayer._children[0].addChild(sp);和Laya.stag...

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

25. 如何隐藏tiledMap中指定的GridSprite? [ 69%]

...失。在Laya中要如何实现这个效果?我原来设想的是通过MapLayer.getDrawSprite(gridX:int, gridY:int):GridSprite获取倒指定图层及位置的GridSprite,然后用GridSprite.hide()隐藏。但是试了之后发现无效。 查看getDrawSprite的源代码: __proto.getDrawSprite=...

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

26. [LayaAir3]Laya旧版本的TiledMap如何隐藏某一层级的格子贴图 [ 67%]

..."," + gridY); const tileLayer = this.tMap.getLayerByName("Ground") as Laya.MapLayer; const gridSprite:Laya.GridSprite = tileLayer.getDrawSprite(gridX, gridY); tileLayer.drawTileTexture(gridSprite,gridX+ 1,gridY + 1); }   下面这个代码是隐藏的,麻烦你替换下,我测试同样不起作...

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

27. tiledmap 可以在图块层的指定格子上添加Sprite吗 [ 66%]

...//, null, new Laya.Point(1600, 816)); } private test(){ var testLayer:Laya.MapLayer = this.tMap.getLayerByName("player"); this.tMapPlayer = new Laya.Sprite(); this.tMapPlayer.graphics.drawRect(0, 0, 100, 100, "#FF0000", "#0000FF", 1); //this.tMapPlayer.loadImage("unit/test.png"); this.tMapPlayer.zOr...

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

28. Laya api 中可能的bug [官方来看] [ 66%]

...前开过一个帖子没人鸟,自己动手处理了。 1.tiledmap中的MapLayer复写了Sprite的render方法,使用了自己的_showGridList顺序,这样在调整zorder时是调整不到的__proto.render=function(context,x,y){ var childs=this._childs; this._childs=this._showGridList; _super....

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

29. TiledMap销毁的问题,TiledMap销毁后屏幕变灰,不能显示 [ 66%]

...on destroy():void { ....... //这里是销毁地图层的代码 var tLayer:MapLayer; for (i = 0; i < _layerArray.length; i++) { tLayer = _layerArray[i]; tLayer.clearAll(); } ........ }然后在MapLayer的clearAll()里面会去销毁子节点GridSprite /** * @private * 清理当前对象 */ public...

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

30. [LayaAir2]性能统计面板中的渲染节点Sprite数量会不断增加,游戏越来越卡 [ 64%]

...物全部清除完后才刷新怪物,怪物是添加在tiledmap地图的maplayer层上的,清除怪物也是从maplayer层上清除的,不添加怪物时渲染节点Sprite数量是245左右,添加了指定数量的怪物动画后渲染节点Sprite数量是800左右,也就是说指定数量...

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