Integrate virtual joystick

This commit is contained in:
PizZaKatZe 2021-02-03 23:28:46 +01:00
parent e75fb9a6a9
commit c3230bc2b3
10 changed files with 170 additions and 16 deletions

View file

@ -9,7 +9,8 @@ const gameQualityKey = 'gameQuality';
const videoQualityKey = 'videoQuality';
const audioPlayerVolumeKey = 'audioVolume';
const audioPlayerMuteKey = 'audioMute';
const helpCameraSettingsShown = 'helpCameraSettingsShown';
const helpCameraSettingsShown = 'helpCameraSettingsShown';
const joystickKey = 'showJoystick';
class LocalUserStore {
saveUser(localUser: LocalUser) {
@ -100,6 +101,13 @@ class LocalUserStore {
getHelpCameraSettingsShown(): boolean {
return localStorage.getItem(helpCameraSettingsShown) === '1';
}
setJoystick(value: boolean): void {
localStorage.setItem(joystickKey, value.toString());
}
getJoystick(): boolean {
return localStorage.getItem(joystickKey) === 'true';
}
}
export const localUserStore = new LocalUserStore();