Ejemplo n.º 1
0
        private void BuildPathableMap()
        {
            pathFinding = new LibTCOD.TCODPathFindingWrapper();

            pathingMap = new PathingMap(template.Width, template.Height);

            for (int i = 0; i < template.Width; i++)
            {
                for (int j = 0; j < template.Height; j++)
                {
                    pathingMap.setCell(i, j,
                                       RoomTemplateTerrainWalkable.terrainWalkable[template.terrainMap[i, j]] ? PathingTerrain.Walkable : PathingTerrain.Unwalkable);
                }
            }

            pathFinding.updateMap(0, pathingMap);
        }
Ejemplo n.º 2
0
        private void BuildPathableMap()
        {
            pathFinding = new LibTCOD.TCODPathFindingWrapper();

            pathingMap = new PathingMap(template.Width, template.Height);

            for (int i = 0; i < template.Width; i++)
            {
                for (int j = 0; j < template.Height; j++)
                {
                    pathingMap.setCell(i, j,
                        RoomTemplateTerrainWalkable.terrainWalkable[template.terrainMap[i, j]] ? PathingTerrain.Walkable : PathingTerrain.Unwalkable);
                }
            }

            pathFinding.updateMap(0, pathingMap);
        }
Ejemplo n.º 3
0
 public Pathing(Dungeon dungeon, Algorithms.IPathFinder pathFinding)
 {
     this.pathFinding = pathFinding;
     this.dungeon     = dungeon;
 }
Ejemplo n.º 4
0
 public Pathing(Dungeon dungeon, Algorithms.IPathFinder pathFinding)
 {
     this.pathFinding = pathFinding;
     this.dungeon = dungeon;
 }