1234567891011121314151617181920212223242526272829303132333435 |
- 'use strict';
- import GameGenerator from '../game-generator';
- import {GameType} from '../../utils/const/game-type-enum';
- import logo from '../../assets/twelveHeroes_cover.png';
- import { PhaserScene } from '../../utils/const/phaser-scene-enum';
- export default class MainMenu extends Phaser.Scene {
- constructor() {
- super({ key: PhaserScene.WORLD, active: false });
- }
- init(data){
- console.log('Init');
- }
- preload() {
- console.log('Preload');
- this.load.image('logo', logo);
- }
- create() {
- console.log('create');
- let logo = this.add.sprite(0,0,'logo');
- logo.setOrigin(0,0);
- setTimeout(() => {
- console.log('timeout end');
- let gameGen = new GameGenerator(GameType.PASSNPLAY);
- this.scene.start('World',{heroesSet:gameGen.getHeroesSet()});
- }, 5000);
- }
- update() {
- }
- }
|