Changed font from text

Input name can only be 4 characters long
Passing name to next scene
This commit is contained in:
David Négrier 2020-05-01 23:19:51 +02:00
parent 85f84517f6
commit 42ddd8b858
7 changed files with 141 additions and 28 deletions

View file

@ -5,6 +5,7 @@ import {DEBUG_MODE, RESOLUTION, ROOM, ZOOM_LEVEL} from "../../Enum/EnvironmentVa
import Tile = Phaser.Tilemaps.Tile;
import {ITiledMap, ITiledTileSet} from "../Map/ITiledMap";
import {cypressAsserter} from "../../Cypress/CypressAsserter";
import { GameSceneInitDataInterface } from "./GameSceneInitDataInterface";
export const GameSceneName = "GameScene";
export enum Textures {
@ -28,6 +29,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
map: ITiledMap;
startX = (window.innerWidth / 2) / RESOLUTION;
startY = (window.innerHeight / 2) / RESOLUTION;
playerName: string;
constructor() {
@ -65,7 +67,9 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
}
//hook initialisation
init(){}
init(data: GameSceneInitDataInterface) {
this.playerName = data.name;
}
//hook create scene
create(): void {