大约有 46 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
...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
...示 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
...并显示,现在我想添加一个角色到对象层中。我使用 var mapLayer = this.tiledMap.getLayerByName("hero"); 次方法可以获取到对象层,然后创建了一个精灵并将角色的图片信息放在了精灵里面, 分别使用了mapLayer._children[0].addChild(sp);和Laya.stag...
来源: Laya_社区 发布时间: 20181211
...失。在Laya中要如何实现这个效果?我原来设想的是通过MapLayer.getDrawSprite(gridX:int, gridY:int):GridSprite获取倒指定图层及位置的GridSprite,然后用GridSprite.hide()隐藏。但是试了之后发现无效。 查看getDrawSprite的源代码: __proto.getDrawSprite=...
来源: Laya_社区 发布时间: 20161228
...//, 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
...前开过一个帖子没人鸟,自己动手处理了。 1.tiledmap中的MapLayer复写了Sprite的render方法,使用了自己的_showGridList顺序,这样在调整zorder时是调整不到的__proto.render=function(context,x,y){ var childs=this._childs; this._childs=this._showGridList; _super....
来源: Laya_社区 发布时间: 20180412
...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
...物全部清除完后才刷新怪物,怪物是添加在tiledmap地图的maplayer层上的,清除怪物也是从maplayer层上清除的,不添加怪物时渲染节点Sprite数量是245左右,添加了指定数量的怪物动画后渲染节点Sprite数量是800左右,也就是说指定数量...
来源: Laya_社区 发布时间: 20240418
设置viewport后显示区域变黑色 在TileMap的MapLayer的init函数中 如果设置viewport,显示区域变黑 如果设置scrollRect,正常显示 // this.viewport = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height); th...
来源: Laya_社区 发布时间: 20170418
...: 与内容相关的链接 提交 1 个回复 Laya_Aaron 赞同来自: 看MapLayer跟TiledMap两个类,你就知道怎么弄了 2018-10-22 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被锁定, 无法添加新回复 发起人 fengzv 相关问题 招...
来源: Laya_社区 发布时间: 20181017