Fixed Difficulty scaling
This commit is contained in:
@@ -102,7 +102,7 @@ namespace InterfaceOff
|
|||||||
const int MIN_SPAWN_TIME = 2 * TICKS_PER_SECOND;
|
const int MIN_SPAWN_TIME = 2 * TICKS_PER_SECOND;
|
||||||
const int MAX_SPAWN_TIME = 5 * TICKS_PER_SECOND;
|
const int MAX_SPAWN_TIME = 5 * TICKS_PER_SECOND;
|
||||||
|
|
||||||
int currentMaxSpawnTime = MAX_SPAWN_TIME - (int)(ScoreTracker.CurrentScore() / DifficultyManager.DifficultyEffect);
|
int currentMaxSpawnTime = MAX_SPAWN_TIME - (int)(ScoreTracker.CurrentScore() * DifficultyManager.DifficultyEffect);
|
||||||
currentMaxSpawnTime = Math.Clamp(currentMaxSpawnTime, MIN_SPAWN_TIME + 1, MAX_SPAWN_TIME);
|
currentMaxSpawnTime = Math.Clamp(currentMaxSpawnTime, MIN_SPAWN_TIME + 1, MAX_SPAWN_TIME);
|
||||||
|
|
||||||
/* Decreases the spawn counter and spawns if at 0 */
|
/* Decreases the spawn counter and spawns if at 0 */
|
||||||
|
|||||||
Reference in New Issue
Block a user