emojimenu, audiomanager

This commit is contained in:
_Bastler
2021-09-14 08:56:37 +02:00
parent cf69b3259a
commit 148540dafe
6 changed files with 59 additions and 36 deletions
+11
View File
@@ -174,6 +174,7 @@ export class GameScene extends DirtyScene {
private peerStoreUnsubscribe!: () => void;
private chatVisibilityUnsubscribe!: () => void;
private emoteUnsubscribe!: () => void;
private emoteMenuUnsubscribe!: () => void;
private biggestAvailableAreaStoreUnsubscribe!: () => void;
MapUrlFile: string;
roomUrl: string;
@@ -624,6 +625,15 @@ export class GameScene extends DirtyScene {
emoteStore.set(null);
}
});
this.emoteMenuUnsubscribe = emoteMenuStore.subscribe((emoteMenu) => {
if (emoteMenu) {
this.userInputManager.disableControls();
} else {
this.userInputManager.restoreControls();
}
})
Promise.all([ this.connectionAnswerPromise as Promise<unknown>, ...scriptPromises ]).then(() => {
this.scene.wake();
});
@@ -1349,6 +1359,7 @@ export class GameScene extends DirtyScene {
this.peerStoreUnsubscribe();
this.chatVisibilityUnsubscribe();
this.emoteUnsubscribe();
this.emoteMenuUnsubscribe();
this.biggestAvailableAreaStoreUnsubscribe();
iframeListener.unregisterAnswerer("getState");
iframeListener.unregisterAnswerer("loadTileset");