правки
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);
|
||||
}
|
||||
}
|
||||
public void SetAddColor(Color color)
|
||||
{
|
||||
((EntityBattleship)EntityShip).AdditionalColor = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -224,6 +224,14 @@ namespace Battleship.DrawningObjects
|
||||
break;
|
||||
}
|
||||
}
|
||||
public void SetColor(Color color)
|
||||
{
|
||||
if(EntityShip == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
EntityShip.BodyColor = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace Battleship.Entities
|
||||
internal class EntityBattleship: EntityShip
|
||||
{
|
||||
|
||||
public Color AdditionalColor { get; private set; }
|
||||
public Color AdditionalColor { get; set; }
|
||||
/// <summary>
|
||||
/// Признак (опция) наличия башни
|
||||
/// </summary>
|
||||
@ -40,7 +40,7 @@ namespace Battleship.Entities
|
||||
Section = section;
|
||||
}
|
||||
|
||||
internal void setAdditionalColor(Color color)
|
||||
public void setAdditionalColor(Color color)
|
||||
{
|
||||
AdditionalColor = color;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ namespace Battleship.Entities
|
||||
/// <summary>
|
||||
/// Основной цвет
|
||||
/// </summary>
|
||||
public Color BodyColor { get; private set; }
|
||||
public Color BodyColor { get; set; }
|
||||
/// <summary>
|
||||
/// Дополнительный цвет (для опциональных элементов)
|
||||
/// </summary>
|
||||
@ -38,7 +38,7 @@ namespace Battleship.Entities
|
||||
BodyColor = bodyColor;
|
||||
}
|
||||
|
||||
internal void setBodyColor(Color color)
|
||||
public void setBodyColor(Color color)
|
||||
{
|
||||
BodyColor = color;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user