55 lines
1.7 KiB
C++
55 lines
1.7 KiB
C++
// Copyright (c) 2022 Dominic Masters
|
|
//
|
|
// This software is released under the MIT License.
|
|
// https://opensource.org/licenses/MIT
|
|
|
|
#pragma once
|
|
#include "scene/Scene.hpp"
|
|
#include "game/DawnGame.hpp"
|
|
#include "util/array.hpp"
|
|
#include "scene/components/Components.hpp"
|
|
#include "scene/components/audio/AudioListener.hpp"
|
|
#include "visualnovel/VisualNovelManager.hpp"
|
|
#include "visualnovel/events/VisualNovelTextboxEvent.hpp"
|
|
#include "visualnovel/events/timing/VisualNovelPauseEvent.hpp"
|
|
#include "visualnovel/events/VisualNovelFadeEvent.hpp"
|
|
#include "visualnovel/events/VisualNovelCallbackEvent.hpp"
|
|
#include "visualnovel/events/VisualNovelChangeSimpleBackgroundEvent.hpp"
|
|
|
|
namespace Dawn {
|
|
class SimpleVNScene : public Scene {
|
|
protected:
|
|
Camera *camera = nullptr;
|
|
UICanvas *canvas = nullptr;
|
|
VisualNovelTextbox *textbox = nullptr;
|
|
SimpleVisualNovelBackground *background = nullptr;
|
|
VisualNovelFader *vnFader = nullptr;
|
|
VisualNovelManager *vnManager = nullptr;
|
|
AudioListener *audioListener = nullptr;
|
|
|
|
/**
|
|
* Internal method to stage the VN scene.
|
|
*/
|
|
virtual void vnStage();
|
|
|
|
public:
|
|
/**
|
|
* Constructs a new Simple VN Scene. Custom class that implements the most
|
|
* common VN Things.
|
|
*
|
|
* @param game
|
|
*/
|
|
SimpleVNScene(DawnGame *game);
|
|
|
|
std::vector<Asset*> getRequiredAssets() override;
|
|
void stage() override;
|
|
|
|
/**
|
|
* Returns the first VN event for the scene. Called by the VN Manager for
|
|
* simple scenes.
|
|
*
|
|
* @return First VN event to be queued.
|
|
*/
|
|
virtual IVisualNovelEvent * getVNEvent() = 0;
|
|
};
|
|
} |