Merge branch 'develop' into newStartMobileScene
# Conflicts: # front/src/Phaser/Login/EnableCameraScene.ts # front/src/Phaser/Login/LoginScene.ts # front/src/Phaser/Login/SelectCharacterScene.ts # front/src/Phaser/Login/SelectCompanionScene.ts
This commit is contained in:
commit
8e52b8597c
@ -9,6 +9,7 @@ import {SoundMeterSprite} from "../Components/SoundMeterSprite";
|
|||||||
import {HtmlUtils} from "../../WebRtc/HtmlUtils";
|
import {HtmlUtils} from "../../WebRtc/HtmlUtils";
|
||||||
import {touchScreenManager} from "../../Touch/TouchScreenManager";
|
import {touchScreenManager} from "../../Touch/TouchScreenManager";
|
||||||
import {PinchManager} from "../UserInput/PinchManager";
|
import {PinchManager} from "../UserInput/PinchManager";
|
||||||
|
import Zone = Phaser.GameObjects.Zone;
|
||||||
import { MenuScene } from "../Menu/MenuScene";
|
import { MenuScene } from "../Menu/MenuScene";
|
||||||
|
|
||||||
export const EnableCameraSceneName = "EnableCameraScene";
|
export const EnableCameraSceneName = "EnableCameraScene";
|
||||||
@ -38,11 +39,9 @@ export class EnableCameraScene extends Phaser.Scene {
|
|||||||
private microphoneNameField!: TextField;
|
private microphoneNameField!: TextField;
|
||||||
private repositionCallback!: (this: Window, ev: UIEvent) => void;
|
private repositionCallback!: (this: Window, ev: UIEvent) => void;
|
||||||
|
|
||||||
private mobileTapRectangle!: Rectangle;
|
|
||||||
|
|
||||||
|
|
||||||
private enableCameraSceneElement!: Phaser.GameObjects.DOMElement;
|
private enableCameraSceneElement!: Phaser.GameObjects.DOMElement;
|
||||||
|
|
||||||
|
private mobileTapZone!: Zone;
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
key: EnableCameraSceneName
|
key: EnableCameraSceneName
|
||||||
@ -82,15 +81,8 @@ export class EnableCameraScene extends Phaser.Scene {
|
|||||||
this.textField = new TextField(this, this.game.renderer.width / 2, 20, '');
|
this.textField = new TextField(this, this.game.renderer.width / 2, 20, '');
|
||||||
|
|
||||||
// For mobile purposes - we need a big enough touchable area.
|
// For mobile purposes - we need a big enough touchable area.
|
||||||
this.mobileTapRectangle = this.add
|
this.mobileTapZone = this.add.zone(this.game.renderer.width / 2,this.game.renderer.height - 30,200,50)
|
||||||
.rectangle(
|
.setInteractive().on("pointerdown", () => {
|
||||||
this.game.renderer.width / 2,
|
|
||||||
this.game.renderer.height - 30,
|
|
||||||
200,
|
|
||||||
50,
|
|
||||||
)
|
|
||||||
.setInteractive()
|
|
||||||
.on("pointerdown", () => {
|
|
||||||
this.login();
|
this.login();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -230,7 +222,7 @@ export class EnableCameraScene extends Phaser.Scene {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.textField.x = this.game.renderer.width / 2;
|
this.textField.x = this.game.renderer.width / 2;
|
||||||
this.mobileTapRectangle.x = this.game.renderer.width / 2;
|
this.mobileTapZone.x = this.game.renderer.width / 2;
|
||||||
this.cameraNameField.x = this.game.renderer.width / 2;
|
this.cameraNameField.x = this.game.renderer.width / 2;
|
||||||
this.microphoneNameField.x = this.game.renderer.width / 2;
|
this.microphoneNameField.x = this.game.renderer.width / 2;
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ export class LoginScene extends ResizableScene {
|
|||||||
|
|
||||||
private loginSceneElement!: Phaser.GameObjects.DOMElement;
|
private loginSceneElement!: Phaser.GameObjects.DOMElement;
|
||||||
private name: string = '';
|
private name: string = '';
|
||||||
|
private mobileTapZone!: Phaser.GameObjects.Zone;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
|
@ -13,6 +13,7 @@ import {areCharacterLayersValid} from "../../Connexion/LocalUser";
|
|||||||
import {touchScreenManager} from "../../Touch/TouchScreenManager";
|
import {touchScreenManager} from "../../Touch/TouchScreenManager";
|
||||||
import {PinchManager} from "../UserInput/PinchManager";
|
import {PinchManager} from "../UserInput/PinchManager";
|
||||||
import {MenuScene} from "../Menu/MenuScene";
|
import {MenuScene} from "../Menu/MenuScene";
|
||||||
|
import Zone = Phaser.GameObjects.Zone;
|
||||||
|
|
||||||
|
|
||||||
//todo: put this constants in a dedicated file
|
//todo: put this constants in a dedicated file
|
||||||
|
@ -10,6 +10,7 @@ import { getAllCompanionResources } from "../Companion/CompanionTexturesLoadingM
|
|||||||
import {touchScreenManager} from "../../Touch/TouchScreenManager";
|
import {touchScreenManager} from "../../Touch/TouchScreenManager";
|
||||||
import {PinchManager} from "../UserInput/PinchManager";
|
import {PinchManager} from "../UserInput/PinchManager";
|
||||||
import { MenuScene } from "../Menu/MenuScene";
|
import { MenuScene } from "../Menu/MenuScene";
|
||||||
|
import Zone = Phaser.GameObjects.Zone;
|
||||||
|
|
||||||
export const SelectCompanionSceneName = "SelectCompanionScene";
|
export const SelectCompanionSceneName = "SelectCompanionScene";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user