protected override WindowedMap <DiamondPoint> CreateWindowedMap() { WindowedMap <DiamondPoint> windowedHexMap; float cellWidth; float cellHeight; Vector2 cellDimensions; switch (mapType) { case MapType.Diamond: cellWidth = CellPrefab.Dimensions.x; cellHeight = CellPrefab.Dimensions.y; cellDimensions = new Vector2(cellWidth, cellHeight); windowedHexMap = new DiamondMap(cellDimensions.HadamardMul(CellSpacingFactor)) .WithWindow(centerRect); break; case MapType.Custom: windowedHexMap = GetCustomMap(); break; default: throw new ArgumentOutOfRangeException(); } return(windowedHexMap); }
protected override IMap3D <DiamondPoint> CreateMap() { switch (mapType) { case MapType.Rect: { var windowedMap = new DiamondMap(cellDimensions.HadamardMul(CellSpacingFactor)) .WithWindow(CenterRect); return(GetAlignedMap(windowedMap)); } case MapType.Custom: { var map = GetCustomMap3D(); return(map); } default: throw new ArgumentOutOfRangeException(); } }