remove the GameSceneInterface from LoginScene

This commit is contained in:
kharhamel 2020-04-30 19:18:35 +02:00
parent e4052a07f3
commit 62d2498e34
2 changed files with 5 additions and 15 deletions

View File

@ -6,8 +6,8 @@ import Tile = Phaser.Tilemaps.Tile;
import {ITiledMap, ITiledTileSet} from "../Map/ITiledMap"; import {ITiledMap, ITiledTileSet} from "../Map/ITiledMap";
import {cypressAsserter} from "../../Cypress/CypressAsserter"; import {cypressAsserter} from "../../Cypress/CypressAsserter";
export const GameSceneName = "GameScene";
export enum Textures { export enum Textures {
Rock = 'rock',
Player = 'playerModel', Player = 'playerModel',
Map = 'map' Map = 'map'
} }
@ -32,7 +32,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
constructor() { constructor() {
super({ super({
key: "GameScene" key: GameSceneName
}); });
this.GameManager = gameManager; this.GameManager = gameManager;
this.Terrains = []; this.Terrains = [];

View File

@ -2,8 +2,7 @@ import {gameManager} from "../Game/GameManager";
import {TextField} from "../Components/TextField"; import {TextField} from "../Components/TextField";
import {TextInput} from "../Components/TextInput"; import {TextInput} from "../Components/TextInput";
import {ClickButton} from "../Components/ClickButton"; import {ClickButton} from "../Components/ClickButton";
import {GameSceneInterface} from "../Game/GameScene"; import {GameSceneName} from "../Game/GameScene";
import {MessageUserPositionInterface} from "../../Connexion";
//todo: put this constants in a dedicated file //todo: put this constants in a dedicated file
export const LoginSceneName = "LoginScene"; export const LoginSceneName = "LoginScene";
@ -11,7 +10,7 @@ enum LoginTextures {
playButton = "play_button", playButton = "play_button",
} }
export class LogincScene extends Phaser.Scene implements GameSceneInterface { export class LogincScene extends Phaser.Scene {
private emailInput: TextInput; private emailInput: TextInput;
private textField: TextField; private textField: TextField;
private playButton: ClickButton; private playButton: ClickButton;
@ -47,16 +46,7 @@ export class LogincScene extends Phaser.Scene implements GameSceneInterface {
let email = this.emailInput.text; let email = this.emailInput.text;
if (!email) return; if (!email) return;
gameManager.connect(email).then(() => { 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<MessageUserPositionInterface>): void {
}
} }