Merge branch 'develop' of github.com:thecodingmachine/workadventure into develop
This commit is contained in:
@@ -227,6 +227,7 @@ export class GameScene extends DirtyScene {
|
||||
private jitsiDominantSpeaker: boolean = false;
|
||||
private jitsiParticipantsCount: number = 0;
|
||||
public readonly superLoad: SuperLoaderPlugin;
|
||||
private allowProximityMeeting: boolean = true;
|
||||
|
||||
constructor(private room: Room, MapUrlFile: string, customKey?: string | undefined) {
|
||||
super({
|
||||
@@ -1140,12 +1141,14 @@ export class GameScene extends DirtyScene {
|
||||
|
||||
this.iframeSubscriptionList.push(
|
||||
iframeListener.disablePlayerProximityMeetingStream.subscribe(() => {
|
||||
this.allowProximityMeeting = false;
|
||||
this.disableMediaBehaviors();
|
||||
})
|
||||
);
|
||||
|
||||
this.iframeSubscriptionList.push(
|
||||
iframeListener.enablePlayerProximityMeetingStream.subscribe(() => {
|
||||
this.allowProximityMeeting = true;
|
||||
this.enableMediaBehaviors();
|
||||
})
|
||||
);
|
||||
@@ -2215,7 +2218,9 @@ export class GameScene extends DirtyScene {
|
||||
}
|
||||
|
||||
public enableMediaBehaviors() {
|
||||
mediaManager.showMyCamera();
|
||||
if (this.allowProximityMeeting) {
|
||||
mediaManager.showMyCamera();
|
||||
}
|
||||
}
|
||||
|
||||
public disableMediaBehaviors() {
|
||||
|
||||
@@ -24,7 +24,6 @@ export class EntryScene extends Scene {
|
||||
|
||||
// From the very start, let's preload images used in the ReconnectingScene.
|
||||
preload() {
|
||||
this.load.image(ReconnectingTextures.icon, "static/images/favicons/favicon-32x32.png");
|
||||
// Note: arcade.png from the Phaser 3 examples at: https://github.com/photonstorm/phaser3-examples/tree/master/public/assets/fonts/bitmap
|
||||
this.load.bitmapFont(ReconnectingTextures.mainFont, "resources/fonts/arcade.png", "resources/fonts/arcade.xml");
|
||||
this.load.spritesheet("cat", "resources/characters/pipoya/Cat 01-1.png", { frameWidth: 32, frameHeight: 32 });
|
||||
|
||||
@@ -2,6 +2,7 @@ import { TextField } from "../Components/TextField";
|
||||
import Image = Phaser.GameObjects.Image;
|
||||
import LL from "../../i18n/i18n-svelte";
|
||||
import { get } from "svelte/store";
|
||||
import { gameManager } from "../Game/GameManager";
|
||||
|
||||
export const ReconnectingSceneName = "ReconnectingScene";
|
||||
export enum ReconnectingTextures {
|
||||
@@ -20,7 +21,10 @@ export class ReconnectingScene extends Phaser.Scene {
|
||||
}
|
||||
|
||||
preload() {
|
||||
this.load.image(ReconnectingTextures.icon, "static/images/favicons/favicon-32x32.png");
|
||||
this.load.image(
|
||||
ReconnectingTextures.icon,
|
||||
gameManager.currentStartedRoom.miniLogo ?? "static/images/favicons/favicon-32x32.png"
|
||||
);
|
||||
// Note: arcade.png from the Phaser 3 examples at: https://github.com/photonstorm/phaser3-examples/tree/master/public/assets/fonts/bitmap
|
||||
this.load.bitmapFont(ReconnectingTextures.mainFont, "resources/fonts/arcade.png", "resources/fonts/arcade.xml");
|
||||
this.load.spritesheet("cat", "resources/characters/pipoya/Cat 01-1.png", { frameWidth: 32, frameHeight: 32 });
|
||||
@@ -30,9 +34,10 @@ export class ReconnectingScene extends Phaser.Scene {
|
||||
this.logo = new Image(
|
||||
this,
|
||||
this.game.renderer.width - 30,
|
||||
this.game.renderer.height - 20,
|
||||
this.game.renderer.height - 30,
|
||||
ReconnectingTextures.icon
|
||||
);
|
||||
this.logo.setDisplaySize(32, 32);
|
||||
this.add.existing(this.logo);
|
||||
|
||||
this.reconnectingField = new TextField(
|
||||
|
||||
Reference in New Issue
Block a user