feat: load system

This commit is contained in:
Gerard Gascón 2024-04-17 00:37:39 +02:00
parent 5d470a57af
commit 60d20bfe4e
20 changed files with 421 additions and 67 deletions

View file

@ -11,13 +11,10 @@ namespace View.UI {
private ExpressionClick _click;
private CustomInput _customInput;
private Score _score;
[SerializeField] private FramedAnimator.FramedAnimator animator;
private void Start() {
_score = FindObjectOfType<Dependencies>().Score;
_click = FindObjectOfType<Dependencies>().ExpressionClick;
_customInput = FindObjectOfType<Dependencies>().CustomInput;
}
@ -26,8 +23,8 @@ namespace View.UI {
CheckInput();
}
public void UpdateView(int score) {
animator.PlayUntil(_score.GrowPercentage);
public void UpdateView(int score, float growPercentage) {
animator.PlayUntil(growPercentage);
text.text = score.ToString();
}