navigate from select character scene to select companion scene

This commit is contained in:
Johannes Berthel 2021-04-02 23:17:04 +02:00
parent 6ee4889773
commit 38c06ce8ff

View File

@ -2,6 +2,7 @@ import {gameManager} from "../Game/GameManager";
import {TextField} from "../Components/TextField";
import Image = Phaser.GameObjects.Image;
import Rectangle = Phaser.GameObjects.Rectangle;
import {SelectCompanionSceneName} from "./SelectCompanionScene";
import {EnableCameraSceneName} from "./EnableCameraScene";
import {CustomizeSceneName} from "./CustomizeScene";
import {ResizableScene} from "./ResizableScene";
@ -145,7 +146,7 @@ export class SelectCharacterScene extends AbstractCharacterScene {
this.scene.stop(SelectCharacterSceneName);
if (this.selectedPlayer !== null) {
gameManager.setCharacterLayers([this.selectedPlayer.texture.key]);
gameManager.tryResumingGame(this, EnableCameraSceneName);
gameManager.tryResumingGame(this, localUserStore.wasCompanionSet() ? EnableCameraSceneName : SelectCompanionSceneName);
} else {
this.scene.run(CustomizeSceneName);
}