forked from YARC-Official/YARG
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e1b9ef
commit 89c0737
Showing
9 changed files
with
137 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,23 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
using TMPro; | ||
using UnityEngine; | ||
|
||
public class ScoreDisplay : MonoBehaviour { | ||
[SerializeField] | ||
private TextMeshProUGUI scoreText; | ||
[SerializeField] | ||
private TextMeshProUGUI scoreText; | ||
|
||
private void Start() { | ||
scoreText.text = $"<mspace=0.59em>0"; | ||
} | ||
private void Start() { | ||
scoreText.text = $"<mspace=0.59em>0"; | ||
} | ||
|
||
private void OnEnable() { | ||
private void OnEnable() { | ||
ScoreKeeper.OnScoreChange += OnScoreChange; | ||
} | ||
|
||
private void OnDisable() { | ||
ScoreKeeper.OnScoreChange -= OnScoreChange; | ||
} | ||
private void OnDisable() { | ||
ScoreKeeper.OnScoreChange -= OnScoreChange; | ||
} | ||
|
||
private void OnScoreChange() { | ||
scoreText.text = $"<mspace=0.59em>{ScoreKeeper.TotalScore:n0}"; | ||
} | ||
private void OnScoreChange() { | ||
scoreText.text = $"<mspace=0.59em>{ScoreKeeper.TotalScore:n0}"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.