This commit is contained in:
2023-01-06 21:01:06 -08:00
parent d13984dddc
commit d6b7895cab
21 changed files with 190 additions and 190 deletions

View File

@ -22,7 +22,6 @@ void VisualNovelManager::onStart() {
this->fader = this->uiCanvas->findElement<VisualNovelFader>();
assertNotNull(this->textBox);
assertNotNull(this->fader);
this->getScene()->eventSceneUnpausedUpdate.addListener(this, &VisualNovelManager::onUnpausedUpdate);

View File

@ -9,7 +9,7 @@ using namespace Dawn;
SimpleVisualNovelBackground * SimpleVisualNovelBackground::create(Scene *s) {
auto item = s->createSceneItem();
item->addComponent<MeshRenderer>();
// item->addComponent<MeshRenderer>();
item->addComponent<MeshHost>();
item->addComponent<Material>();
auto background = item->addComponent<SimpleVisualNovelBackground>();

View File

@ -14,23 +14,26 @@ SimpleVNScene::SimpleVNScene(DawnGame *game) : Scene(game) {
std::vector<Asset*> SimpleVNScene::getRequiredAssets() {
auto assMan = &this->game->assetManager;
// return PokerGameTextbox::getAssets(assMan);
std::vector<Asset*> assets;
vectorAppend(&assets, VisualNovelTextboxPrefab::getRequiredAssets(assMan));
return std::vector<Asset*>();
}
void SimpleVNScene::stage() {
auto assMan = &this->game->assetManager;
// Camera
this->camera = Camera::create(this);
this->camera->transform->lookAtPixelPerfect(
glm::vec3(0, 0, 0),
glm::vec3(0, 0, 0),
1.0f,
this->camera->getRenderTarget()->getHeight(),
camera->fov
);
// UI
this->canvas = UICanvas::createCanvas(this);
// this->textbox = Prefab::create<VisualNovelTextboxPrefab>(this)->getComponent<VisualNovelTextbox>();
this->canvas = UICanvas::create(this);
this->textbox = VisualNovelTextboxPrefab::create(this->canvas);
this->background = SimpleVisualNovelBackground::create(this);
// VN Manager

View File

@ -13,6 +13,7 @@
#include "visualnovel/events/VisualNovelPauseEvent.hpp"
#include "visualnovel/events/VisualNovelFadeEvent.hpp"
#include "visualnovel/events/VisualNovelChangeSimpleBackgroundEvent.hpp"
#include "prefabs/ui/VisualNovelTextboxPrefab.hpp"
namespace Dawn {
class SimpleVNScene : public Scene {