[Fix] Naming

This commit is contained in:
2026-03-01 11:52:15 +07:00
parent 0f9b162061
commit 6c10a35bf9
34 changed files with 133 additions and 93 deletions
+3 -3
View File
@@ -21,12 +21,12 @@ namespace YachtDice.UI
[SerializeField] private Color previewPositiveColor = new Color(0.85f, 1f, 0.85f, 1f);
[SerializeField] private Color previewZeroColor = new Color(1f, 0.88f, 0.88f, 1f);
private CategoryDefinitionSO category;
private CategoryDefinition category;
private bool isUsed;
public event Action<CategoryDefinitionSO> OnCategorySelected;
public event Action<CategoryDefinition> OnCategorySelected;
public void Initialize(CategoryDefinitionSO categoryDef)
public void Initialize(CategoryDefinition categoryDef)
{
category = categoryDef;
isUsed = false;
+5 -5
View File
@@ -39,12 +39,12 @@ namespace YachtDice.UI
private const int UpperBonusValue = 35;
private ModifierRegistry modifierRegistry;
private CategoryCatalogSO categoryCatalog;
private CategoryCatalog categoryCatalog;
private InventoryModel inventoryModel;
private ShopModel shopModel;
[Inject]
public void Construct(ModifierRegistry modifierRegistry, CategoryCatalogSO categoryCatalog)
public void Construct(ModifierRegistry modifierRegistry, CategoryCatalog categoryCatalog)
{
this.modifierRegistry = modifierRegistry;
this.categoryCatalog = categoryCatalog;
@@ -217,7 +217,7 @@ namespace YachtDice.UI
dicePanelView.SetDieValue(index, value);
}
private void HandleScored(CategoryDefinitionSO category, int finalScore)
private void HandleScored(CategoryDefinition category, int finalScore)
{
scoreCardView.SetCategoryScored(category, finalScore);
UpdateTotalDisplay();
@@ -259,7 +259,7 @@ namespace YachtDice.UI
dicePanelView.SetDieLocked(index, isLocked);
}
private void HandleCategorySelected(CategoryDefinitionSO category)
private void HandleCategorySelected(CategoryDefinition category)
{
if (!gameManager.CanScore) return;
if (scoringSystem.IsCategoryUsed(category)) return;
@@ -317,7 +317,7 @@ namespace YachtDice.UI
private void UpdatePreviewScores()
{
var dice = diceManager.GetDice();
var previews = new Dictionary<CategoryDefinitionSO, int>();
var previews = new Dictionary<CategoryDefinition, int>();
var allCategories = categoryCatalog.All;
for (int i = 0; i < allCategories.Count; i++)
+8 -8
View File
@@ -16,19 +16,19 @@ namespace YachtDice.UI
[SerializeField] private TMP_Text upperBonusText;
[SerializeField] private TMP_Text totalScoreText;
public event Action<CategoryDefinitionSO> OnCategorySelected;
public event Action<CategoryDefinition> OnCategorySelected;
private CategoryCatalogSO catalog;
private Dictionary<CategoryDefinitionSO, int> categoryToRowIndex;
private CategoryCatalog catalog;
private Dictionary<CategoryDefinition, int> categoryToRowIndex;
/// <summary>
/// Инициализирует скоркарту из каталога категорий.
/// Вызывается из GameController после DI.
/// </summary>
public void Initialize(CategoryCatalogSO categoryCatalog)
public void Initialize(CategoryCatalog categoryCatalog)
{
catalog = categoryCatalog;
categoryToRowIndex = new Dictionary<CategoryDefinitionSO, int>();
categoryToRowIndex = new Dictionary<CategoryDefinition, int>();
var all = catalog.All;
int count = Mathf.Min(categoryRows.Count, all.Count);
@@ -43,7 +43,7 @@ namespace YachtDice.UI
UpdateTotalDisplay(0, 0, false);
}
public void UpdatePreviews(Dictionary<CategoryDefinitionSO, int> previews)
public void UpdatePreviews(Dictionary<CategoryDefinition, int> previews)
{
foreach (var kvp in previews)
{
@@ -64,7 +64,7 @@ namespace YachtDice.UI
}
}
public void SetCategoryScored(CategoryDefinitionSO category, int score)
public void SetCategoryScored(CategoryDefinition category, int score)
{
if (categoryToRowIndex.TryGetValue(category, out int index))
categoryRows[index].SetRecordedScore(score);
@@ -91,7 +91,7 @@ namespace YachtDice.UI
UpdateTotalDisplay(0, 0, false);
}
private void HandleCategorySelected(CategoryDefinitionSO category)
private void HandleCategorySelected(CategoryDefinition category)
{
OnCategorySelected?.Invoke(category);
}