private void _Build(Data.LEVEL_UNIT unit, IEnumerable <MazeCell> cells, Func <Flag <MAZEWALL>, IEnumerable <float> > get_directions) { foreach (var mazeCell in cells) { var center = mazeCell.GetPosition(_Width, _Height); foreach (var direction in get_directions(mazeCell.Walls)) { _Level.Add(new LevelUnit(unit, center, direction)); } } }
public LevelUnit(Data.LEVEL_UNIT type, Vector2 center, float direction) { Type = type; Center = center; Direction = direction; }