mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
T to restart - request
This commit is contained in:
parent
8416ad018f
commit
11f84e8d81
2 changed files with 13 additions and 0 deletions
|
|
@ -974,6 +974,11 @@ class MarbleWorld extends Scheduler {
|
|||
ProfilerUI.measure("updateTimer");
|
||||
this.updateTimer(dt);
|
||||
|
||||
if ((Key.isPressed(Settings.controlsSettings.respawn)) && this.finishTime == null) {
|
||||
this.restart();
|
||||
return;
|
||||
}
|
||||
|
||||
this.tickSchedule(timeState.currentAttemptTime);
|
||||
|
||||
this.updateGameState();
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ typedef ControlsSettings = {
|
|||
var cameraSensitivity:Float;
|
||||
var invertYAxis:Bool;
|
||||
var rewind:Int;
|
||||
var respawn:Int;
|
||||
}
|
||||
|
||||
typedef TouchSettings = {
|
||||
|
|
@ -118,6 +119,7 @@ class Settings {
|
|||
cameraSensitivity: 0.6,
|
||||
invertYAxis: false,
|
||||
rewind: Key.R,
|
||||
respawn: Key.T,
|
||||
};
|
||||
|
||||
public static var touchSettings:TouchSettings = {
|
||||
|
|
@ -270,6 +272,9 @@ class Settings {
|
|||
if (controlsSettings.rewind == 0) {
|
||||
controlsSettings.rewind = Key.R;
|
||||
}
|
||||
if (controlsSettings.respawn == 0) {
|
||||
controlsSettings.respawn = Key.T;
|
||||
}
|
||||
if (touchSettings.rewindButtonPos == null) {
|
||||
touchSettings.rewindButtonPos = [380, 240];
|
||||
touchSettings.rewindButtonSize = 60;
|
||||
|
|
@ -284,6 +289,9 @@ class Settings {
|
|||
if (controlsSettings.rewind == null) {
|
||||
controlsSettings.rewind = Key.R;
|
||||
}
|
||||
if (controlsSettings.respawn == null) {
|
||||
controlsSettings.respawn = Key.T;
|
||||
}
|
||||
if (optionsSettings.rewindEnabled == null) {
|
||||
optionsSettings.rewindEnabled = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue