Open ghost opened 7 years ago
Not sure if implementation would be easy with the current set up, but could we have the case of maxTimesAWave... = 0 to skip the check entirely (effectively making 0 equal to infinite times)?
That can be confusing for the person editing the level though. But if 0 is the default value for maxTimesAWave, then maybe we can leave a note in the editor somewhere specifying that 0 would be infinite?
We could perhaps use a slider or one of the other editor inputs to force a range of values (disallow 0 or other bad numbers, like negative)? But yeah, I could see that that might be confusing to have 0 work as infinite number of spawns.
Each level contains numWaves and maxTimesAWaveCanInstantiate. The numWaves variable determines the number of waves in a particular level (not the number of type of waves, may need a better variable name for this). Currently checking whether wave related variables are 'sensibly' set by the line:
level.numWaves / level.maxTimesAWaveCanInstantiate > level.waves.Length
If the statement above evaluates to true, then there is something wrong. See #112.Add a check to see if maxTimesAWaveCanInstantiate is <= 0. Decide on default values for numWaves and maxTimesAWaveCanInstantiate.