правки
This commit is contained in:
parent
2b46380712
commit
f6b058b912
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -224,6 +224,14 @@ namespace Battleship.DrawningObjects
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void SetColor(Color color)
|
||||||
|
{
|
||||||
|
if(EntityShip == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
EntityShip.BodyColor = color;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user