git repos / blockattack-game

commit 38fbf4d7

sago007 · 2019-02-09 18:10
38fbf4d75f032ad63038e0599d71dfc1209afb94 patch · browse files
parent 5e3bf51747492ed7548af1ef95559adac5a73c74

Adjusted the speed levels.

Changed files

M source/code/BlockGame.cpp before
diff --git a/source/code/BlockGame.cpp b/source/code/BlockGame.cpp index a16b58c..8170ab5 100644 --- a/source/code/BlockGame.cpp +++ b/source/code/BlockGame.cpp
@@ -154,19 +154,19 @@ void BlockGame::setGameSpeed(int globalSpeedLevel) {
baseSpeed=0.5;
break;
case 1:
- baseSpeed=0.3;
+ baseSpeed=0.1;
break;
case 2:
- baseSpeed=0.1;
+ baseSpeed=0.07;
break;
case 3:
- baseSpeed=0.07;
+ baseSpeed=0.04;
break;
case 4:
- baseSpeed=0.04;
+ baseSpeed=0.015;
break;
default:
- baseSpeed=0.015;
+ baseSpeed=0.005;
break;
};
}
@@ -1764,7 +1764,7 @@ void BlockGame::Update() {
//increse speed:
if ((nowTime>gameStartedAt+20000*speedLevel)&&(speedLevel <99)&&(!bGameOver)) {
- speed = (baseSpeed*0.9)/((double)speedLevel*0.5);
+ speed = (baseSpeed*0.9)/((double)speedLevel*0.8);
speedLevel++;
nrPushedPixel=(int)((double)(nowTime-gameStartedAt)/(1000.0*speed));
}