protected override ShipElement GetShipElement(ShipMapCell cell) { if (cell == null) { return(null); } return(cell.StandObject); }
protected override void SetShipElement(ShipMapCell cell, ShipElement element) { if (cell == null) { return; } cell.StandCable = (Cable)element; }
public ShipMap(int width, int heigth) { Width = width; Heigth = heigth; Map = new ShipMapCell[width, heigth]; for (int i = 0; i < Map.Length; i++) { var p = new Point(i % Map.GetLength(0), i / Map.GetLength(0)); Map[p.X, p.Y] = new ShipMapCell(p); } }
protected abstract void SetShipElement(ShipMapCell cell, ShipElement element);
protected abstract ShipElement GetShipElement(ShipMapCell cell);
protected override void SetShipElement(ShipMapCell cell, ShipElement element) { cell.StandObject = (DeckObject)element; }
protected override void SetShipElement(ShipMapCell cell, ShipElement element) { cell.StandAirPipe = (AirPipe)element; }
protected override void SetShipElement(ShipMapCell cell, ShipElement element) { cell.Deck = (FloorTile)element; }