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); }
public MazeUnitEvent(MazeUnitEventType mazeUnitEventType, UnityEngine.Collider c, MazeUnit mazeUnit) { this.mazeUnitEventType = mazeUnitEventType; this.c = c; this.mazeUnit = mazeUnit; }
public PathElement(MazeUnit unit, UnitType type = UnitType.I, TurnType turn = TurnType.STRAIGHT) { Type = type; Turn = turn; Unit = unit; }