diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index e36fe809..f7fbd7c3 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -6,8 +6,8 @@ import Tile = Phaser.Tilemaps.Tile; import {ITiledMap, ITiledTileSet} from "../Map/ITiledMap"; import {cypressAsserter} from "../../Cypress/CypressAsserter"; +export const GameSceneName = "GameScene"; export enum Textures { - Rock = 'rock', Player = 'playerModel', Map = 'map' } @@ -32,7 +32,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{ constructor() { super({ - key: "GameScene" + key: GameSceneName }); this.GameManager = gameManager; this.Terrains = []; diff --git a/front/src/Phaser/Login/LogincScene.ts b/front/src/Phaser/Login/LogincScene.ts index 1aa1e0af..15ead519 100644 --- a/front/src/Phaser/Login/LogincScene.ts +++ b/front/src/Phaser/Login/LogincScene.ts @@ -2,8 +2,7 @@ import {gameManager} from "../Game/GameManager"; import {TextField} from "../Components/TextField"; import {TextInput} from "../Components/TextInput"; import {ClickButton} from "../Components/ClickButton"; -import {GameSceneInterface} from "../Game/GameScene"; -import {MessageUserPositionInterface} from "../../Connexion"; +import {GameSceneName} from "../Game/GameScene"; //todo: put this constants in a dedicated file export const LoginSceneName = "LoginScene"; @@ -11,7 +10,7 @@ enum LoginTextures { playButton = "play_button", } -export class LogincScene extends Phaser.Scene implements GameSceneInterface { +export class LogincScene extends Phaser.Scene { private emailInput: TextInput; private textField: TextField; private playButton: ClickButton; @@ -47,16 +46,7 @@ export class LogincScene extends Phaser.Scene implements GameSceneInterface { let email = this.emailInput.text; if (!email) return; gameManager.connect(email).then(() => { - this.scene.start("GameScene"); + this.scene.start(GameSceneName); }); } - - Map: Phaser.Tilemaps.Tilemap; - RoomId: string; - - createCurrentPlayer(UserId: string): void { - } - - shareUserPosition(UsersPosition: Array): void { - } } \ No newline at end of file