правки
This commit is contained in:
parent
f9fa6794b5
commit
1c81aec3af
@ -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>
|
||||||
@ -39,10 +39,10 @@ namespace Battleship.Entities
|
|||||||
Tower = tower;
|
Tower = tower;
|
||||||
Section = section;
|
Section = section;
|
||||||
}
|
}
|
||||||
|
public void setAdditionalColor(Color color)
|
||||||
internal 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>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user