Ejemplo n.º 1
0
        /// <summary>
        /// マップ情報を作成する
        /// </summary>
        public void BuildMap(int mapIndex, int width, int height, Tile.MapTile tile)
        {
            _tilemap.ClearAllTiles();

            _mapLevel = mapIndex;

            // 見えない壁補正をつける
#if false
            var correct = _masterHolder.Const.CorrectionMapSize;
            for (int y = 0, ySize = height + correct.y; y <= ySize; ++y)
            {
                for (int x = 0, xSize = width + correct.x; x <= xSize; ++x)
                {
                    _tilemap.SetTile(new Vector3Int(x, y, 0), tile);
                }
            }
#endif
            DebugInitDebugTileUI(width, height);

            for (int y = 0; y <= height; ++y)
            {
                for (int x = 0; x <= width; ++x)
                {
                    var cellPosition = new Vector3Int(x, y, 0);
                    _tilemap.SetTile(cellPosition, tile);

                    DebugSetTileDebugView(cellPosition, width);
                }
            }

            SetGridName(mapIndex);
        }
Ejemplo n.º 2
0
 public void Setup()
 {
     _mapTile = Resources.Load <Tile.MapTile>("Tiles/MiniMapTile");
     if (_mapTile == null)
     {
         Utility.Log.Error("MiniMapTileリソースが見つかりません");
     }
 }