правки

This commit is contained in:
Казначеева Елизавета 2023-12-05 21:44:19 +04:00
parent 2b46380712
commit f6b058b912
4 changed files with 16 additions and 4 deletions

View File

@ -48,5 +48,9 @@ namespace Battleship.DrawningObjects
g.DrawRectangle(pen, _startPosX + 75, _startPosY + 70, 40, 10); g.DrawRectangle(pen, _startPosX + 75, _startPosY + 70, 40, 10);
} }
} }
public void SetAddColor(Color color)
{
((EntityBattleship)EntityShip).AdditionalColor = color;
}
} }
} }

View File

@ -224,6 +224,14 @@ namespace Battleship.DrawningObjects
break; break;
} }
} }
public void SetColor(Color color)
{
if(EntityShip == null)
{
return;
}
EntityShip.BodyColor = color;
}
} }
} }

View File

@ -10,7 +10,7 @@ namespace Battleship.Entities
internal class EntityBattleship: EntityShip internal class EntityBattleship: EntityShip
{ {
public Color AdditionalColor { get; private set; } public Color AdditionalColor { get; set; }
/// <summary> /// <summary>
/// Признак (опция) наличия башни /// Признак (опция) наличия башни
/// </summary> /// </summary>
@ -40,7 +40,7 @@ namespace Battleship.Entities
Section = section; Section = section;
} }
internal void setAdditionalColor(Color color) public void setAdditionalColor(Color color)
{ {
AdditionalColor = color; AdditionalColor = color;
} }

View File

@ -19,7 +19,7 @@ namespace Battleship.Entities
/// <summary> /// <summary>
/// Основной цвет /// Основной цвет
/// </summary> /// </summary>
public Color BodyColor { get; private set; } public Color BodyColor { get; set; }
/// <summary> /// <summary>
/// Дополнительный цвет (для опциональных элементов) /// Дополнительный цвет (для опциональных элементов)
/// </summary> /// </summary>
@ -38,7 +38,7 @@ namespace Battleship.Entities
BodyColor = bodyColor; BodyColor = bodyColor;
} }
internal void setBodyColor(Color color) public void setBodyColor(Color color)
{ {
BodyColor = color; BodyColor = color;
} }