2023-03-14 22:27:46 -07:00

46 lines
1.3 KiB
C++

// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#pragma once
#include "visualnovel/scene/SimpleVNScene.hpp"
#include "scenes/Scene_3.hpp"
namespace Dawn {
class Scene_2 : public SimpleVNScene {
protected:
void vnStage() override {
}
void onSceneEnded() {
auto scene = new Scene_3(this->game);
game->assetManager.queueSwap(
scene->getRequiredAssets(), this->getRequiredAssets()
);
game->assetManager.syncLoad();
scene->stage();
this->game->sceneCutover(scene);
}
public:
Scene_2(DawnGame *game) : SimpleVNScene(game) {
}
std::vector<Asset*> getRequiredAssets() override {
std::vector<Asset*> assets = SimpleVNScene::getRequiredAssets();
return assets;
}
IVisualNovelEvent * getVNEvent() override {
auto start = new VisualNovelPauseEvent(vnManager, 0.1f);
start
->then(new VisualNovelTextboxEvent(vnManager, "scene.2.1"))
->then(new VisualNovelCallbackEvent<Scene_2>(vnManager, this, &Scene_2::onSceneEnded))
;
return start;
}
};
}