public WorldSpace AddCell(WorldSpaceCell cell) { if (GetAt(cell.X, cell.Y, cell.Z) != null) throw new InvalidOperationException("There is already a cell at this location."); _cells.Add(cell); return this; }
public V2 CalculatePosition(WorldSpaceCell cell) { var pos = new V2( cell.X * TileStepX + (cell.Y % 2 == 1 ? OddRowXOffset : 0), cell.Y * TileStepY + (HeightTileOffset * cell.Z)); System.Diagnostics.Debug.WriteLine(pos.X + ", " + pos.Y); return pos; }
public WorldSpace AddCell(WorldSpaceCell cell) { if (GetAt(cell.X, cell.Y, cell.Z) != null) { throw new InvalidOperationException("There is already a cell at this location."); } _cells.Add(cell); return(this); }