1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Initial waypoint support

This commit is contained in:
tobspr
2020-05-28 19:40:48 +02:00
parent 37685d64bd
commit ec021780d8
30 changed files with 598 additions and 314 deletions

View File

@@ -37,14 +37,6 @@ export class GameTime extends BasicSerializableObject {
// Store how much time we have in bucket
this.logicTimeBudget = 0;
if (G_IS_DEV) {
window.addEventListener("keydown", ev => {
if (ev.key === "p") {
this.requestSpeedToggle();
}
});
}
}
static getId() {
@@ -199,23 +191,6 @@ export class GameTime extends BasicSerializableObject {
return this.speed.getId() === PausedGameSpeed.getId();
}
requestSpeedToggle() {
logger.warn("Request speed toggle");
switch (this.speed.getId()) {
case PausedGameSpeed.getId():
this.setSpeed(new RegularGameSpeed(this.root));
break;
case RegularGameSpeed.getId():
this.setSpeed(new PausedGameSpeed(this.root));
break;
case FastForwardGameSpeed.getId():
this.setSpeed(new RegularGameSpeed(this.root));
break;
}
}
getSpeed() {
return this.speed;
}