[Rem] Upper sum Text & upper bonus text | previewText & recordedScoreText (move to scoreText)
This commit is contained in:
@@ -12,8 +12,6 @@ namespace YachtDice.UI
|
||||
[SerializeField] private List<CategoryRowView> categoryRows = new();
|
||||
|
||||
[Header("Summary")]
|
||||
[SerializeField] private TMP_Text upperSumText;
|
||||
[SerializeField] private TMP_Text upperBonusText;
|
||||
[SerializeField] private TMP_Text totalScoreText;
|
||||
|
||||
public event Action<CategoryDefinition> OnCategorySelected;
|
||||
@@ -40,7 +38,7 @@ namespace YachtDice.UI
|
||||
_categoryToRowIndex[all[i]] = i;
|
||||
}
|
||||
|
||||
UpdateTotalDisplay(0, 0, false);
|
||||
UpdateTotalDisplay(0);
|
||||
}
|
||||
|
||||
public void UpdatePreviews(Dictionary<CategoryDefinition, int> previews)
|
||||
@@ -76,14 +74,9 @@ namespace YachtDice.UI
|
||||
t.SetInteractable(interactable);
|
||||
}
|
||||
|
||||
public void UpdateTotalDisplay(int totalScore, int upperSum, bool hasUpperBonus)
|
||||
public void UpdateTotalDisplay(int totalScore)
|
||||
{
|
||||
var threshold = _catalog != null ? _catalog.UpperBonusThreshold : 63;
|
||||
var bonusValue = _catalog != null ? _catalog.UpperBonusValue : 35;
|
||||
|
||||
totalScoreText.text = totalScore.ToString();
|
||||
upperSumText.text = $"{upperSum} / {threshold}";
|
||||
upperBonusText.text = hasUpperBonus ? $"+{bonusValue}" : "---";
|
||||
}
|
||||
|
||||
public void ResetAll()
|
||||
@@ -91,7 +84,7 @@ namespace YachtDice.UI
|
||||
foreach (var t in categoryRows)
|
||||
t.ResetRow();
|
||||
|
||||
UpdateTotalDisplay(0, 0, false);
|
||||
UpdateTotalDisplay(0);
|
||||
}
|
||||
|
||||
private void HandleCategorySelected(CategoryDefinition category)
|
||||
|
||||
Reference in New Issue
Block a user