From 25fe435ae88418ac99628d041027d6b874dea006 Mon Sep 17 00:00:00 2001 From: J08nY Date: Mon, 18 Apr 2016 09:04:18 +0200 Subject: fixed bug: the game was supposed to have 4 levels with the third being infinite. however -1 != Infinity :) fixed bug: the last level was supposed to increase in difficulty, however not so much that it freezes. --- game.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'game.ts') diff --git a/game.ts b/game.ts index e244429..6ee4c70 100644 --- a/game.ts +++ b/game.ts @@ -485,7 +485,7 @@ class Level extends Physijs.Scene { private ground:Physijs.BoxMesh; private time:number = 0; - static durations:number[] = [25, 30, -1]; + static durations:number[] = [25, 30, 45, Infinity]; static numLevels:number = Level.durations.length; static mat:Physijs.Material = Physijs.createMaterial( @@ -611,7 +611,7 @@ class Level extends Physijs.Scene { //spawn new mob? let amount = 0.004 * ((this.level+1)/2+0.8); if(this.level == Level.numLevels-1){ - amount+=this.time/100000; + amount+=(this.time/1000)/2000; } if (Math.random() < amount) { -- cgit v1.2.3-70-g09d2