Files
YachtDice/Assets/Scripts/Dice/DiceInstance.cs
T
2026-03-02 05:25:05 +07:00

28 lines
812 B
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace YachtDice.Dice
{
/// <summary>
/// Рантайм-состояние одного дайса.
/// Хранит текущее значение верхней грани и ссылку на определение типа.
/// </summary>
public class DiceInstance : IDice
{
public DiсeDefinition Definition { get; }
public int Value { get; set; }
public bool IsLocked { get; set; }
public DiceInstance(DiсeDefinition definition)
{
Definition = definition;
Value = 0;
IsLocked = false;
}
public DiceInstance(DiсeDefinition definition, int initialValue)
{
Definition = definition;
Value = initialValue;
IsLocked = false;
}
}
}