コード例 #1
0
        public static MazeUnit[,] FillGridWith(IEnumerable <MazeUnit> existingUnits, int columns, int rows)
        {
            var grid = new MazeUnit[columns, rows];

            foreach (var unit in existingUnits)
            {
                var x = (int)unit.GridID.x;
                var y = (int)unit.GridID.y;
                grid[x, y] = unit;
            }

            return(grid);
        }
コード例 #2
0
 public MazeUnitEvent(MazeUnitEventType mazeUnitEventType, UnityEngine.Collider c, MazeUnit mazeUnit)
 {
     this.mazeUnitEventType = mazeUnitEventType;
     this.c        = c;
     this.mazeUnit = mazeUnit;
 }
コード例 #3
0
 public PathElement(MazeUnit unit, UnitType type = UnitType.I, TurnType turn = TurnType.STRAIGHT)
 {
     Type = type;
     Turn = turn;
     Unit = unit;
 }