Files
YachtDice/Assets/Scripts/Dice/StandardDiceSO.cs
T
horooko 13b18b0a8b [Rename] Unify Die → Dice naming across the entire project
Standardize all class, interface, file, method, event, field, and variable
names from the inconsistent "Die" form to "Dice", matching the existing
DiceManager/DiceCatalog/DiceCollection convention.

Renamed files (7 + meta): IDie→IDice, DieInstance→DiceInstance,
DieDefinitionSO→DiceDefinitionSO, StandardDieSO→StandardDiceSO,
DieValueCondition→DiceValueCondition, AddPerDieEffect→AddPerDiceEffect,
MultiplyPerDieEffect→MultiplyPerDiceEffect.

Updated all 31 consumer and test files with matching reference changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-02 05:37:12 +07:00

34 lines
1.1 KiB
C#

using UnityEngine;
namespace YachtDice.Dice
{
/// <summary>
/// Стандартный дайс с настраиваемыми значениями граней.
/// По умолчанию — классический d6 (1-6).
/// </summary>
[CreateAssetMenu(fileName = "StandardDice", menuName = "YachtDice/Dice/Standard Dice")]
public class StandardDiceSO : DiceDefinitionSO
{
[Header("Configuration")]
[SerializeField] private int[] faceValues = { 1, 2, 3, 4, 5, 6 };
public override int FaceCount => faceValues.Length;
public override int[] GetFaceValues()
{
int[] copy = new int[faceValues.Length];
System.Array.Copy(faceValues, copy, faceValues.Length);
return copy;
}
#if UNITY_EDITOR
public static StandardDiceSO CreateStandardD6ForTest()
{
var so = CreateForTest<StandardDiceSO>("standard_d6", "Стандартный d6");
so.faceValues = new[] { 1, 2, 3, 4, 5, 6 };
return so;
}
#endif
}
}