66 lines
1.9 KiB
C++
66 lines
1.9 KiB
C++
// Copyright (c) 2023 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "PokerVNScene.hpp"
|
|
#include "prefabs/characters/PennyPrefab.hpp"
|
|
#include "scenes/Scene_13.hpp"
|
|
|
|
namespace Dawn {
|
|
class Scene_12 : public PokerVNScene {
|
|
protected:
|
|
PennyPrefab *penny;
|
|
PennyPrefab *julie;
|
|
PennyPrefab *sammy;
|
|
PennyPrefab *lucy;
|
|
|
|
void vnStage() override {
|
|
penny = PennyPrefab::create(this);
|
|
julie = PennyPrefab::create(this);
|
|
sammy = PennyPrefab::create(this);
|
|
lucy = PennyPrefab::create(this);
|
|
|
|
PokerVNScene::vnStage();
|
|
}
|
|
|
|
void onSceneEnded() {
|
|
auto scene = new Scene_13(this->game);
|
|
game->assetManager.queueSwap(
|
|
scene->getRequiredAssets(), this->getRequiredAssets()
|
|
);
|
|
game->assetManager.syncLoad();
|
|
scene->stage();
|
|
this->game->sceneCutover(scene);
|
|
}
|
|
|
|
std::vector<PokerPlayer *> getPokerPlayers() override {
|
|
return std::vector<PokerPlayer*>{
|
|
this->penny->getComponent<PokerPlayer>(),
|
|
this->julie->getComponent<PokerPlayer>(),
|
|
this->sammy->getComponent<PokerPlayer>(),
|
|
this->lucy->getComponent<PokerPlayer>()
|
|
};
|
|
}
|
|
|
|
public:
|
|
Scene_12(DawnGame *game) : PokerVNScene(game) {}
|
|
|
|
std::vector<Asset*> getRequiredAssets() override {
|
|
auto assMan = &this->game->assetManager;
|
|
std::vector<Asset*> assets;
|
|
vectorAppend(&assets, PokerVNScene::getRequiredAssets());
|
|
vectorAppend(&assets, PennyPrefab::getRequiredAssets(assMan));
|
|
return assets;
|
|
}
|
|
|
|
IVisualNovelEvent * getVNEvent() override {
|
|
auto start = new VisualNovelTextboxEvent(vnManager, "scene.12.1");
|
|
start
|
|
->then(new VisualNovelCallbackEvent<Scene_12>(vnManager, this, &Scene_12::onSceneEnded))
|
|
;
|
|
return start;
|
|
}
|
|
};
|
|
} |