[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>
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using UnityEngine;
|
||||
using YachtDice.Shop;
|
||||
|
||||
namespace YachtDice.Dice
|
||||
{
|
||||
/// <summary>
|
||||
/// Абстрактное определение типа дайса.
|
||||
/// Наследники описывают конкретные виды (стандартный d6, специальные и т.д.).
|
||||
/// </summary>
|
||||
public abstract class DiceDefinitionSO : ScriptableObject, IShopItem
|
||||
{
|
||||
[field: Header("Identity")]
|
||||
[field: SerializeField] public string Id { get; private set; }
|
||||
[field: SerializeField] public string DisplayName { get; private set; }
|
||||
[field: SerializeField, TextArea] public string Description { get; private set; }
|
||||
[field: SerializeField] public Sprite Icon { get; private set; }
|
||||
|
||||
[field: Header("Economy")]
|
||||
[field: SerializeField] public int ShopPrice { get; private set; }
|
||||
|
||||
public bool IsRepurchasable => false;
|
||||
|
||||
/// <summary>Количество граней.</summary>
|
||||
public abstract int FaceCount { get; }
|
||||
|
||||
/// <summary>Возвращает массив всех возможных значений граней.</summary>
|
||||
public abstract int[] GetFaceValues();
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public static T CreateForTest<T>(string id, string displayName = null,
|
||||
int shopPrice = 0, string description = null) where T : DiceDefinitionSO
|
||||
{
|
||||
var so = CreateInstance<T>();
|
||||
so.Id = id;
|
||||
so.DisplayName = displayName ?? id;
|
||||
so.Description = description ?? id;
|
||||
so.ShopPrice = shopPrice;
|
||||
return so;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user