mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
fix ui scaling and alarm sound
This commit is contained in:
parent
9edd1a1fcb
commit
93f0f73bba
2 changed files with 6 additions and 1 deletions
|
|
@ -973,11 +973,16 @@ class MarbleWorld extends Scheduler {
|
||||||
if (timeTravelSound == null) {
|
if (timeTravelSound == null) {
|
||||||
var ttsnd = ResourceLoader.getResource("data/sound/timetravelactive.wav", ResourceLoader.getAudio, this.soundResources);
|
var ttsnd = ResourceLoader.getResource("data/sound/timetravelactive.wav", ResourceLoader.getAudio, this.soundResources);
|
||||||
timeTravelSound = AudioManager.playSound(ttsnd, null, true);
|
timeTravelSound = AudioManager.playSound(ttsnd, null, true);
|
||||||
|
|
||||||
|
if (alarmSound != null)
|
||||||
|
alarmSound.pause = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (timeTravelSound != null) {
|
if (timeTravelSound != null) {
|
||||||
timeTravelSound.stop();
|
timeTravelSound.stop();
|
||||||
timeTravelSound = null;
|
timeTravelSound = null;
|
||||||
|
if (alarmSound != null)
|
||||||
|
alarmSound.pause = false;
|
||||||
}
|
}
|
||||||
if (this.timeState.currentAttemptTime >= 3.5)
|
if (this.timeState.currentAttemptTime >= 3.5)
|
||||||
this.timeState.gameplayClock += dt;
|
this.timeState.gameplayClock += dt;
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ class Settings {
|
||||||
#if hl
|
#if hl
|
||||||
Window.getInstance().resize(optionsSettings.screenWidth, optionsSettings.screenHeight);
|
Window.getInstance().resize(optionsSettings.screenWidth, optionsSettings.screenHeight);
|
||||||
Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed;
|
Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed;
|
||||||
uiScale = Window.getInstance().windowToPixelRatio;
|
uiScale = 1 / Window.getInstance().windowToPixelRatio;
|
||||||
#end
|
#end
|
||||||
#if js
|
#if js
|
||||||
Window.getInstance().propagateKeyEvents = true;
|
Window.getInstance().propagateKeyEvents = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue