大约有 9 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0039 秒)
... private var m_bkSound:Sound; private var m_mapLayer:Sprite; private var m_MapImgUrl:String; private var m_Role:Animation; private var m_RolePosition:Point = new Point(1200,1000); private var m_MovStartPos:Point =...
来源: Laya_社区 发布时间: 20170921
...Laya.Sprite(); this.sp.graphics.drawRect(0,0,100,100,"#FF0000"); var mapLayer = this.tiledMap.getLayerByIndex(1); console.info(mapLayer.layerName); this.sp.pos(0,0); mapLayer._childs[0].addChild(this.sp); } } new GameInfo(); 遇到的问题1 把精灵插入地图时 如果代...
来源: Laya_社区 发布时间: 20171125
...该是BG段的长度,难道不是么?并且细心的同学会发现在maplayer计算坐标的位置都会用这个width/2方式计算格子和屏幕坐标如方法 /** * 通过地图坐标得到屏幕坐标 * @param tileX 格子坐标X * @param...
来源: Laya_社区 发布时间: 20161109
...示 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
...dMap)); } private var sp:Sprite; private function onLoadedMap():void { var mapLayer:MapLayer=tiledMap.getLayerByIndex(2); sp=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FF0000"); sp.zOrder=1000; mapLayer.addChild(sp); Laya.timer.loop(200,this,onLoop); } private var aaa:Number=0; priva...
来源: Laya_社区 发布时间: 20170525
设置viewport后显示区域变黑色 在TileMap的MapLayer的init函数中 如果设置viewport,显示区域变黑 如果设置scrollRect,正常显示 // this.viewport = new Rectangle(0, 0, Laya.stage.width, Laya.stage.height); th...
来源: Laya_社区 发布时间: 20170418
...//, 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
... Laya.Rectangle; var Handler = Laya.Handler; var Sprite = Laya.Sprite; var MapLayer = Laya.MapLayer; Laya.init(800, 800); var map1 = new TiledMap(); map1.createMap("res/maps/scence1.json",new Rectangle(0,0,800, 800),Handler.create(this,onMapLoaded)); function onMapLoaded(){ console.log("地图加载...
来源: Laya_社区 发布时间: 20180326
... this._aniName = null; } } class MapLayer extends Laya.Sprite { constructor() { super(...arguments); this._mapData = null; this._tileWidthHalf = 0; this._tileHeightHalf = 0; ...
来源: Laya_社区 发布时间: 20220627