коммит
This commit is contained in:
parent
91f5aff2a2
commit
2f936be74a
@ -4,9 +4,9 @@ public class DrawingContainerShip extends DrawingShip{
|
||||
|
||||
|
||||
|
||||
private DrawingDecks drawingDecks;
|
||||
private DrawingDecksTrapez drawingDecksTrapez;
|
||||
private DrawingDecksRect drawingDecksRect;
|
||||
|
||||
private IDecksDrawing iDecksDrawing;
|
||||
|
||||
public DrawingContainerShip(int speed, double weight, Color bodyColor, Color
|
||||
additionalColor, boolean crane, boolean containers,int deck, int deckType, int width, int height)
|
||||
{
|
||||
@ -15,12 +15,18 @@ additionalColor, boolean crane, boolean containers,int deck, int deckType, int w
|
||||
{
|
||||
EntityShip = new EntityContainerShip(speed, weight, bodyColor,
|
||||
additionalColor, crane, containers,deck, deckType);
|
||||
drawingDecks = new DrawingDecks();
|
||||
drawingDecksTrapez = new DrawingDecksTrapez();
|
||||
drawingDecksRect = new DrawingDecksRect();
|
||||
drawingDecksRect.setNumDecks(deck);
|
||||
drawingDecksTrapez.setNumDecks(deck);
|
||||
drawingDecks.setNumDecks(deck);
|
||||
|
||||
|
||||
if(deckType == 1){
|
||||
iDecksDrawing = new DrawingDecks();
|
||||
}
|
||||
if(deckType == 2){
|
||||
iDecksDrawing = new DrawingDecksTrapez();
|
||||
}
|
||||
if(deckType == 3){
|
||||
iDecksDrawing = new DrawingDecksRect();
|
||||
}
|
||||
iDecksDrawing.setNumDecks(deck);
|
||||
}
|
||||
}
|
||||
@Override
|
||||
@ -61,15 +67,7 @@ additionalColor, boolean crane, boolean containers,int deck, int deckType, int w
|
||||
g.drawLine(_startPosX + 47, _startPosY+20, _startPosX + 67, _startPosY + 30);
|
||||
g.drawLine(_startPosX + 67, _startPosY + 33, _startPosX + 67, _startPosY + 45);
|
||||
}
|
||||
if(((EntityContainerShip)EntityShip).DeckType == 1){
|
||||
drawingDecks.DrawDeck(_startPosX, _startPosY,EntityShip.BodyColor ,g);
|
||||
}
|
||||
if(((EntityContainerShip)EntityShip).DeckType == 2){
|
||||
drawingDecksTrapez.DrawDeck(_startPosX, _startPosY,EntityShip.BodyColor, g);
|
||||
}
|
||||
if(((EntityContainerShip)EntityShip).DeckType == 3){
|
||||
drawingDecksRect.DrawDeck(_startPosX, _startPosY, EntityShip.BodyColor, g);
|
||||
}
|
||||
iDecksDrawing.DrawDeck(_startPosX, _startPosY, EntityShip.BodyColor, g);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user