refactor: Moved spawn logic to the presenter

This commit is contained in:
Gerard Gascón 2024-04-16 15:09:41 +02:00
parent 859d34e3bb
commit dd9640fc39
4 changed files with 9 additions and 67 deletions

View file

@ -50,9 +50,7 @@ namespace View.UI {
}
public void UpdateView(int score) {
int frameDifference = score % _model.SpawnRate;
animator.PlayUntil(frameDifference / (float)_model.SpawnRate);
animator.PlayUntil(_model.GrowPercentage);
text.text = score.ToString();
}
}