Migrating ConsoleGlobalMessageManager in svelte
This commit is contained in:
parent
1880022971
commit
232fd33ec8
15 changed files with 386 additions and 509 deletions
|
@ -2,6 +2,7 @@ import type { Direction } from "../../types";
|
|||
import type {GameScene} from "../Game/GameScene";
|
||||
import {touchScreenManager} from "../../Touch/TouchScreenManager";
|
||||
import {MobileJoystick} from "../Components/MobileJoystick";
|
||||
import {enableUserInputsStore} from "../../Stores/UserInputStore";
|
||||
|
||||
interface UserInputManagerDatum {
|
||||
keyInstance: Phaser.Input.Keyboard.Key;
|
||||
|
@ -58,6 +59,10 @@ export class UserInputManager {
|
|||
if (touchScreenManager.supportTouchScreen) {
|
||||
this.initVirtualJoystick();
|
||||
}
|
||||
|
||||
enableUserInputsStore.subscribe((enable) => {
|
||||
enable ? this.restoreControls() : this.disableControls()
|
||||
})
|
||||
}
|
||||
|
||||
initVirtualJoystick() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue