})
});
this.load.tilemapTiledJSON(Textures.Map, mapUrl);
- this.load.spritesheet(Textures.Player,
- 'resources/characters/pipoya/Male 01-1.png',
- { frameWidth: 32, frameHeight: 32 }
- );
+
+ //add player png
+ PLAYER_RESOURCES.forEach((playerResource: any) => {
+ this.load.spritesheet(
+ playerResource.name,
+ playerResource.img,
+ {frameWidth: 32, frameHeight: 32}
+ );
+ });
+
this.load.bitmapFont('main_font', 'resources/fonts/arcade.png', 'resources/fonts/arcade.xml');
-
- cypressAsserter.preloadFinished();
}
//hook initialisation
import {TextField} from "../Components/TextField";
import {TextInput} from "../Components/TextInput";
import {ClickButton} from "../Components/ClickButton";
-import {GameSceneName} from "../Game/GameScene";
+import {GameSceneInterface, GameSceneName, Textures} from "../Game/GameScene";
import Image = Phaser.GameObjects.Image;
+import {Player} from "../Player/Player";
+import {getPlayerAnimations, PlayerAnimationNames} from "../Player/Animation";
+import Rectangle = Phaser.GameObjects.Rectangle;
+import {PLAYER_RESOURCES} from "../Entity/PlayableCaracter";
+ import {cypressAsserter} from "../../Cypress/CypressAsserter";
//todo: put this constants in a dedicated file
export const LoginSceneName = "LoginScene";
this.load.image(LoginTextures.icon, "resources/logos/tcm_full.png");
// Note: arcade.png from the Phaser 3 examples at: https://github.com/photonstorm/phaser3-examples/tree/master/public/assets/fonts/bitmap
this.load.bitmapFont(LoginTextures.mainFont, 'resources/fonts/arcade.png', 'resources/fonts/arcade.xml');
+ cypressAsserter.preloadFinished();
+ //add player png
+ PLAYER_RESOURCES.forEach((playerResource: any) => {
+ this.load.spritesheet(
+ playerResource.name,
+ playerResource.img,
+ {frameWidth: 32, frameHeight: 32}
+ );
+ });
}
create() {
}
return this.login(name);
});
+
+ /*create user*/
+ this.createCurrentPlayer("test");
+ cypressAsserter.initFinished();
}
update(time: number, delta: number): void {