123456789101112131415161718192021222324252627282930313233343536 |
- 'use strict';
- import DeckBuildingScene from './deck-building-scene';
- import { Faction } from '../../common/utils/const/faction-enum';
- import * as Utils from '../../common/utils/prompt-renderer';
- export default class FactionDeckBuildingScene extends DeckBuildingScene {
- constructor(gameEventListener) {
- super();
- this.gameEventListener = gameEventListener;
- }
- preload() {
- console.log('Preload');
- }
- create() {
- console.log('create');
- setTimeout(() => {
- let factionOptions = Object.values(Faction).filter(faction => faction !== Faction.NONE);
- let pBlueFaction = Utils.promptSelectAmongOptions("Select Player Blue Faction", factionOptions);
- factionOptions = factionOptions.filter(faction => faction !== pBlueFaction);
- let pRedFaction = Utils.promptSelectAmongOptions("Select Player Red Faction", factionOptions);
- this.gameEventListener.onFactionsSelected(pBlueFaction, pRedFaction );
- }, 100);
- }
- update() {
- }
- }
|