feat: Rose grow animation
This commit is contained in:
parent
f8a29f1501
commit
438b16fc6e
9 changed files with 186 additions and 4 deletions
|
@ -2,19 +2,19 @@
|
|||
public class Model {
|
||||
public int Score { private set; get; }
|
||||
|
||||
private readonly int _spawnRate;
|
||||
public readonly int SpawnRate;
|
||||
private bool _needsToSpawn;
|
||||
|
||||
public Model(int spawnRate) : this(0, spawnRate) { }
|
||||
|
||||
public Model(int score, int spawnRate) {
|
||||
Score = score;
|
||||
_spawnRate = spawnRate;
|
||||
SpawnRate = spawnRate;
|
||||
}
|
||||
|
||||
public void AddScore() {
|
||||
Score++;
|
||||
if (Score % _spawnRate == 0)
|
||||
if (Score % SpawnRate == 0)
|
||||
_needsToSpawn = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue