コード例 #1
0
ファイル: GraphFactory.cs プロジェクト: antouhou/HexCore
        public static Graph CreateRectangularGraph(int width, int height,
                                                   MovementTypes movementTypes,
                                                   TerrainType defaultTerrainType,
                                                   OffsetTypes offsetType = OffsetTypes.OddRowsRight)
        {
            var graph = new Graph(new CellState[] { }.ToList(), movementTypes);

            GraphUtils.ResizeSquareGraph(graph, offsetType, width, height, defaultTerrainType);

            return(graph);
        }
コード例 #2
0
        public Graph(List <CellState> cellStates, MovementTypes movementAndTerrainTypes)
        {
            MovementTypes = movementAndTerrainTypes;

            AddCells(cellStates);
        }