Exemple #1
0
 protected override ShipElement GetShipElement(ShipMapCell cell)
 {
     if (cell == null)
     {
         return(null);
     }
     return(cell.StandObject);
 }
Exemple #2
0
 protected override void SetShipElement(ShipMapCell cell, ShipElement element)
 {
     if (cell == null)
     {
         return;
     }
     cell.StandCable = (Cable)element;
 }
Exemple #3
0
 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);
     }
 }
Exemple #4
0
 protected abstract void SetShipElement(ShipMapCell cell, ShipElement element);
Exemple #5
0
 protected abstract ShipElement GetShipElement(ShipMapCell cell);
Exemple #6
0
 protected override void SetShipElement(ShipMapCell cell, ShipElement element)
 {
     cell.StandObject = (DeckObject)element;
 }
Exemple #7
0
 protected override void SetShipElement(ShipMapCell cell, ShipElement element)
 {
     cell.StandAirPipe = (AirPipe)element;
 }
Exemple #8
0
 protected override void SetShipElement(ShipMapCell cell, ShipElement element)
 {
     cell.Deck = (FloorTile)element;
 }