Added basic prefabs finally
This commit is contained in:
@ -12,4 +12,5 @@ target_sources(${DAWN_TARGET_NAME}
|
||||
# Subdirs
|
||||
add_subdirectory(components)
|
||||
add_subdirectory(events)
|
||||
add_subdirectory(scene)
|
||||
add_subdirectory(ui)
|
10
src/dawn/visualnovel/scene/CMakeLists.txt
Normal file
10
src/dawn/visualnovel/scene/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2022 Dominic Masters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${DAWN_TARGET_NAME}
|
||||
PRIVATE
|
||||
SimpleVNScene.cpp
|
||||
)
|
@ -14,7 +14,8 @@ SimpleVNScene::SimpleVNScene(DawnGame *game) : Scene(game) {
|
||||
|
||||
std::vector<Asset*> SimpleVNScene::getRequiredAssets() {
|
||||
auto assMan = &this->game->assetManager;
|
||||
return PokerGameTextbox::getAssets(assMan);
|
||||
// return PokerGameTextbox::getAssets(assMan);
|
||||
return std::vector<Asset*>();
|
||||
}
|
||||
|
||||
void SimpleVNScene::stage() {
|
||||
@ -29,7 +30,7 @@ void SimpleVNScene::stage() {
|
||||
|
||||
// UI
|
||||
this->canvas = UICanvas::createCanvas(this);
|
||||
this->textbox = Prefab::create<VisualNovelTextboxPrefab>(this)->getComponent<VisualNovelTextbox>();
|
||||
// this->textbox = Prefab::create<VisualNovelTextboxPrefab>(this)->getComponent<VisualNovelTextbox>();
|
||||
this->background = SimpleVisualNovelBackground::create(this);
|
||||
|
||||
// VN Manager
|
||||
@ -44,8 +45,4 @@ void SimpleVNScene::stage() {
|
||||
|
||||
// Begin VN.
|
||||
this->vnManager->setEvent(this->getVNEvent());
|
||||
}
|
||||
|
||||
void SimpleVNScene::vnStage() {
|
||||
|
||||
}
|
@ -8,7 +8,6 @@
|
||||
#include "game/DawnGame.hpp"
|
||||
#include "util/array.hpp"
|
||||
#include "scene/components/Components.hpp"
|
||||
#include "prefabs/VisualNovelTextboxPrefab.hpp"
|
||||
#include "visualnovel/VisualNovelManager.hpp"
|
||||
#include "visualnovel/events/VisualNovelTextboxEvent.hpp"
|
||||
#include "visualnovel/events/VisualNovelPauseEvent.hpp"
|
||||
@ -25,7 +24,7 @@ namespace Dawn {
|
||||
VisualNovelFader *vnFader = nullptr;
|
||||
VisualNovelManager *vnManager = nullptr;
|
||||
|
||||
virtual void vnStage();
|
||||
virtual void vnStage() = 0;
|
||||
virtual IVisualNovelEvent * getVNEvent() = 0;
|
||||
|
||||
public:
|
||||
|
Reference in New Issue
Block a user