mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 02:37:12 +02:00
Fix coding standard issues
This commit is contained in:
parent
f1ab013511
commit
7f8f870d9f
1 changed files with 21 additions and 19 deletions
|
@ -27,6 +27,9 @@
|
|||
|
||||
var NUM_COLORS = 7;
|
||||
var COUNTDOWN_SECONDS = 9;
|
||||
//Lowering the spawn rate below 10 spawns so many balloons that the interface slows down
|
||||
var MIN_SPAWN_RATE = 10;
|
||||
var MILLISECONDS_IN_SECOND = 1000;
|
||||
|
||||
var _this = this;
|
||||
var spawnRate = 2000;
|
||||
|
@ -41,7 +44,6 @@
|
|||
var countdownIntervalID;
|
||||
var countdownEntityID;
|
||||
|
||||
|
||||
_this.preload = function (pEntityID) {
|
||||
var parentProperties = Entities.getEntityProperties(pEntityID, ["userData"]),
|
||||
spawnMusicURL,
|
||||
|
@ -116,9 +118,9 @@
|
|||
spawnRate = !isNaN(spawnerSettings.spawnRate) ? spawnerSettings.spawnRate : spawnRate;
|
||||
spawnMusicVolume = !isNaN(spawnerSettings.spawnMusicVolume) ? spawnerSettings.spawnMusicVolume : 0.1;
|
||||
|
||||
if (spawnRate < 10){
|
||||
spawnRate = 10;
|
||||
print("The lowest balloon spawn rate allowed is 10.");
|
||||
if (spawnRate < MIN_SPAWN_RATE) {
|
||||
spawnRate = MIN_SPAWN_RATE;
|
||||
print("The lowest balloon spawn rate allowed is " + MIN_SPAWN_RATE);
|
||||
}
|
||||
|
||||
if (spawnMusic.downloaded) {
|
||||
|
@ -190,7 +192,7 @@
|
|||
Entities.addEntity(balloonProperties);
|
||||
|
||||
//Clean up after spawnDuration
|
||||
if (spawnCount * spawnRate / 1000 > spawnDuration){
|
||||
if (spawnCount * spawnRate / MILLISECONDS_IN_SECOND > spawnDuration) {
|
||||
_this.cleanUp(pEntityID);
|
||||
}
|
||||
}, spawnRate);
|
||||
|
|
Loading…
Reference in a new issue