Dawn/src/dawnpokergame/scenes/TestScene.hpp
2022-11-19 13:42:04 -08:00

40 lines
1.1 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 "scene/components/Components.hpp"
#include "ui/PokerGameTextbox.hpp"
#include "visualnovel/VisualNovelManager.hpp"
#include "visualnovel/events/VisualNovelTextboxEvent.hpp"
namespace Dawn {
class TestScene {
public:
static Scene * create(DawnGame *game) {
Scene *scene = new Scene(game);
// Camera
auto camera = Camera::create(scene);
camera->transform->lookAt(glm::vec3(50, 50, 50), glm::vec3(0, 0, 0));
// UI
auto canvas = UICanvas::createCanvas(scene);
auto textbox = PokerGameTextbox::create(canvas);
// VN Manager
auto item = scene->createSceneItem();
auto vnManager = item->addComponent<VisualNovelManager>();
vnManager
->setEvent(new VisualNovelTextboxEvent(vnManager, "Bruh event"))
->then(new VisualNovelTextboxEvent(vnManager, "Bruh event 2"))
;
return scene;
}
};
}