46 lines
1.2 KiB
C++

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