refactor: Cleaned up score view interface
This commit is contained in:
parent
779af276d3
commit
858e49e1d9
13 changed files with 36 additions and 123 deletions
|
@ -4,7 +4,7 @@ using TMPro;
|
|||
using UnityEngine;
|
||||
|
||||
namespace View.UI {
|
||||
public class ExpressionInput : MonoBehaviour, IExpressionInput {
|
||||
public class ScoreView : MonoBehaviour, IScoreView {
|
||||
[SerializeField] private TMP_Text text;
|
||||
|
||||
private ExpressionClick _click;
|
||||
|
@ -18,7 +18,7 @@ namespace View.UI {
|
|||
private void Update() =>
|
||||
CheckInput();
|
||||
|
||||
public void UpdateView(int score, float growPercentage) =>
|
||||
public void UpdateView(int score) =>
|
||||
text.text = score.ToString();
|
||||
|
||||
private void CheckInput() {
|
|
@ -5,7 +5,7 @@ using UnityEngine.EventSystems;
|
|||
using UnityEngine.UI;
|
||||
|
||||
namespace View.UI {
|
||||
public class UIVisibility : MonoBehaviour, IExpressionInput {
|
||||
public class UIVisibility : MonoBehaviour, IScoreView {
|
||||
[SerializeField] private CanvasGroup ui;
|
||||
[SerializeField] private float fadeDuration = .5f;
|
||||
|
||||
|
@ -31,7 +31,7 @@ namespace View.UI {
|
|||
}
|
||||
}
|
||||
|
||||
public void UpdateView(int score, float growPercentage) {
|
||||
public void UpdateView(int score) {
|
||||
if (!_titleVisible) return;
|
||||
_titleVisible = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue