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 {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 = [];

View File

@ -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<MessageUserPositionInterface>): void {
}
}