Example #1
0
        public void SetTile(int x, int y, TileInfo info)
        {
            if (info.tileType == TileInfo.TileType.Wall)
            {

            }
            _colMap[x, y] = info;
        }
Example #2
0
 public void SetColMap(TileInfo[,] colMap)
 {
     _colMap = colMap;
 }
Example #3
0
        private void UpdateAstar()
        {
            TileInfo[,] tiles = new TileInfo[_mapX, _mapY];

            for (int x = 0; x < _mapX; x++)
            {
                for (int y = 0; y < _mapY; y++)
                {
                    if (_mapElements[x, y, _surfacePoint] == null)
                        tiles[x, y] = new TileInfo() { tileType = TileInfo.TileType.Floor };
                    else if (_mapElements[x, y, _surfacePoint].ElementEffect == MapElementEffect.Solid)
                        tiles[x, y] = new TileInfo() { tileType = TileInfo.TileType.Wall };
                    else
                    {
                        tiles[x, y] = new TileInfo() { tileType = TileInfo.TileType.Floor };
                    }
                }
            }

            _astar.SetColMap(tiles);
        }