Adding HdpiManager to start and scale from a default resolution that is correct by default for the game.
Fixing VirtualJoystick on resize.
This commit is contained in:
@@ -59,7 +59,7 @@ export class UserInputManager {
|
||||
this.initVirtualJoystick();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
initVirtualJoystick() {
|
||||
this.joystick = new MobileJoystick(this.Scene);
|
||||
this.joystick.on("update", () => {
|
||||
@@ -171,4 +171,8 @@ export class UserInputManager {
|
||||
removeSpaceEventListner(callback : Function){
|
||||
this.Scene.input.keyboard.removeListener('keyup-SPACE', callback);
|
||||
}
|
||||
|
||||
destroy(): void {
|
||||
this.joystick.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user