feat: blood spawn test

This commit is contained in:
Gerard Gascón 2024-04-18 20:14:38 +02:00
parent 76c60f1519
commit 349552674d
7 changed files with 5074 additions and 2 deletions

View file

@ -21,6 +21,8 @@ namespace View.UI {
[SerializeField] private Animation growAnimation;
[SerializeField] private Animation endAnimation;
[SerializeField] private ParticleSystem growParticle;
private void Start() {
_click = FindObjectOfType<Dependencies>().ExpressionClick;
_customInput = FindObjectOfType<Dependencies>().CustomInput;
@ -47,9 +49,11 @@ namespace View.UI {
}
public void UpdateView(int score, float growPercentage) {
if (animator.CurrentAnimation == "Rosa_Grow") {
if (animator.CurrentAnimation == "Rosa_Grow")
animator.PlayUntil(IsLastGrowState(score, growPercentage) ? 1f : growPercentage);
}
growParticle.Play();
text.text = score.ToString();
_firstUpdate = false;
}