forkad från vergnet/application-amicale
Improved level cap
This commit is contained in:
förälder
879ae46abe
incheckning
7a00452cc0
1 ändrade filer med 5 tillägg och 2 borttagningar
|
@ -55,7 +55,7 @@ export default class GameLogic {
|
||||||
this.gamePaused = false;
|
this.gamePaused = false;
|
||||||
this.colors = colors;
|
this.colors = colors;
|
||||||
this.autoRepeatActivationDelay = 300;
|
this.autoRepeatActivationDelay = 300;
|
||||||
this.autoRepeatDelay = 100;
|
this.autoRepeatDelay = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
getHeight(): number {
|
getHeight(): number {
|
||||||
|
@ -116,7 +116,10 @@ export default class GameLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
canLevelUp() {
|
canLevelUp() {
|
||||||
return this.levelProgression > this.level * 5;
|
let canLevel = this.levelProgression > this.level * 5;
|
||||||
|
if (canLevel)
|
||||||
|
this.levelProgression -= this.level * 5;
|
||||||
|
return canLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
freezeTetromino() {
|
freezeTetromino() {
|
||||||
|
|
Laddar…
Referens i nytt ärende