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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user