[Fix] Refactor project

This commit is contained in:
2026-03-02 12:49:12 +07:00
parent f65976796d
commit f52131f755
44 changed files with 449 additions and 404 deletions
+9 -9
View File
@@ -57,10 +57,10 @@ namespace YachtDice.UI
public void ClearAllPreviews()
{
for (int i = 0; i < categoryRows.Count; i++)
foreach (var t in categoryRows)
{
categoryRows[i].HidePreview();
categoryRows[i].SetInteractable(false);
t.HidePreview();
t.SetInteractable(false);
}
}
@@ -72,8 +72,8 @@ namespace YachtDice.UI
public void SetAllInteractable(bool interactable)
{
for (int i = 0; i < categoryRows.Count; i++)
categoryRows[i].SetInteractable(interactable);
foreach (var t in categoryRows)
t.SetInteractable(interactable);
}
public void UpdateTotalDisplay(int totalScore, int upperSum, bool hasUpperBonus)
@@ -85,8 +85,8 @@ namespace YachtDice.UI
public void ResetAll()
{
for (int i = 0; i < categoryRows.Count; i++)
categoryRows[i].ResetRow();
foreach (var t in categoryRows)
t.ResetRow();
UpdateTotalDisplay(0, 0, false);
}
@@ -98,8 +98,8 @@ namespace YachtDice.UI
private void OnDestroy()
{
for (int i = 0; i < categoryRows.Count; i++)
categoryRows[i].OnCategorySelected -= HandleCategorySelected;
foreach (var t in categoryRows)
t.OnCategorySelected -= HandleCategorySelected;
}
}
}