feat: new rose spawn animation
This commit is contained in:
parent
b3996c6831
commit
1580910ec1
113 changed files with 6558 additions and 23 deletions
|
@ -6,14 +6,10 @@ namespace Presenter {
|
|||
private readonly IScoreView _view;
|
||||
private readonly IRoseGrow _grow;
|
||||
private readonly IInputCallback _onInputReceived;
|
||||
private readonly IRoseSpawner _spawner;
|
||||
|
||||
private bool CanSpawn => _score.Value % (_score.GrowIterations * _score.SpawnRate) == 0;
|
||||
|
||||
public ExpressionClick(Score score, IScoreView view, IRoseSpawner spawner, IRoseGrow grow, IInputCallback inputCallback) {
|
||||
public ExpressionClick(Score score, IScoreView view, IRoseGrow grow, IInputCallback inputCallback) {
|
||||
_score = score;
|
||||
_view = view;
|
||||
_spawner = spawner;
|
||||
_grow = grow;
|
||||
_onInputReceived = inputCallback;
|
||||
}
|
||||
|
@ -23,12 +19,6 @@ namespace Presenter {
|
|||
_view.UpdateView(_score.Value);
|
||||
_onInputReceived.OnInputReceived();
|
||||
|
||||
if (CanSpawn) {
|
||||
if(_score.Roses > Score.InitialRosesThreshold)
|
||||
_spawner.SpawnRose();
|
||||
else
|
||||
_spawner.SpawnInitialRose();
|
||||
}
|
||||
if (_score.Value % _score.GrowIterations == 0)
|
||||
_grow.GrowStep();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue