private function createMap():void
{
tiledMap = new TiledMap();
tiledMap.createMap("res/tiledMap/orthogonal-test-movelayer.json", new Rectangle(0, 0, Laya.stage.width, Laya.stage.height),Handler.create(this,onComplete));
}
private function onComplete():void
{
// TODO Auto Generated method stub
trace(tiledMap.tileWidth,tiledMap.tileHeight);
}
1 个回复
cuixueying
赞同来自:
sizeGrid获取的是整个地图块的大小,并非切割后单个地图块的大小
请在tiledMap加载完成后使用tileWidth和tileHeight获取单块地图的大小