[Fix] Naming
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user