Fixing Cypress tests
This commit is contained in:
parent
8355a89dc5
commit
ad3484285b
2 changed files with 7 additions and 9 deletions
|
@ -4,7 +4,6 @@ import {CurrentGamerInterface, GamerInterface, hasMovedEventName, Player} from "
|
|||
import {DEBUG_MODE, RESOLUTION, ROOM, ZOOM_LEVEL} from "../../Enum/EnvironmentVariable";
|
||||
import Tile = Phaser.Tilemaps.Tile;
|
||||
import {ITiledMap, ITiledTileSet} from "../Map/ITiledMap";
|
||||
import {cypressAsserter} from "../../Cypress/CypressAsserter";
|
||||
|
||||
export const GameSceneName = "GameScene";
|
||||
export enum Textures {
|
||||
|
@ -41,7 +40,6 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
//hook preload scene
|
||||
preload(): void {
|
||||
this.GameManager.setCurrentGameScene(this);
|
||||
cypressAsserter.preloadStarted();
|
||||
let mapUrl = 'maps/map.json';
|
||||
this.load.on('filecomplete-tilemapJSON-'+Textures.Map, (key: string, type: string, data: any) => {
|
||||
// Triggered when the map is loaded
|
||||
|
@ -62,8 +60,6 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
{ frameWidth: 32, frameHeight: 32 }
|
||||
);
|
||||
this.load.bitmapFont('main_font', 'resources/fonts/arcade.png', 'resources/fonts/arcade.xml');
|
||||
|
||||
cypressAsserter.preloadFinished();
|
||||
}
|
||||
|
||||
//hook initialisation
|
||||
|
@ -72,8 +68,6 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
|
||||
//hook create scene
|
||||
create(): void {
|
||||
cypressAsserter.initStarted();
|
||||
|
||||
//initalise map
|
||||
this.Map = this.add.tilemap("map");
|
||||
this.map.tilesets.forEach((tileset: ITiledTileSet) => {
|
||||
|
@ -113,7 +107,6 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
|
||||
//initialise camera
|
||||
this.initCamera();
|
||||
cypressAsserter.initFinished();
|
||||
}
|
||||
|
||||
//todo: in a dedicated class/function?
|
||||
|
@ -174,7 +167,7 @@ export class GameScene extends Phaser.Scene implements GameSceneInterface{
|
|||
this.createCollisionObject();
|
||||
this.CurrentPlayer.on(hasMovedEventName, this.pushPlayerPosition.bind(this))
|
||||
}
|
||||
|
||||
|
||||
pushPlayerPosition(event: HasMovedEvent) {
|
||||
this.GameManager.pushPlayerPosition(event);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue