fix: first clicks now are properly detected
This commit is contained in:
parent
db839ea96d
commit
2cddb7a7b9
13 changed files with 99 additions and 30 deletions
|
@ -23,8 +23,12 @@ namespace Presenter {
|
|||
_view.UpdateView(_score.Value);
|
||||
_onInputReceived.OnInputReceived();
|
||||
|
||||
if (CanSpawn)
|
||||
_spawner.SpawnRose();
|
||||
if (CanSpawn) {
|
||||
if(_score.Value > Score.InitialRosesThreshold)
|
||||
_spawner.SpawnRose();
|
||||
else
|
||||
_spawner.SpawnInitialRose();
|
||||
}
|
||||
if (_score.Value % _score.GrowIterations == 0)
|
||||
_grow.GrowStep();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
namespace Presenter {
|
||||
public interface IRoseSpawner {
|
||||
void SpawnRose();
|
||||
void SpawnInitialRose();
|
||||
}
|
||||
}
|
|
@ -22,9 +22,12 @@ namespace Presenter.SaveSystem {
|
|||
_scoreView.UpdateView(_score.Value);
|
||||
_growAnimation.GrowStep();
|
||||
|
||||
int roses = _score.Value / (_score.SpawnRate * _score.GrowIterations);
|
||||
for (int i = 0; i < roses; i++)
|
||||
_spawner.SpawnRose();
|
||||
for (int i = 0; i < _score.Roses; i++) {
|
||||
if (_score.Roses > Score.InitialRosesThreshold)
|
||||
_spawner.SpawnRose();
|
||||
else
|
||||
_spawner.SpawnInitialRose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue