Event Work

This commit is contained in:
2022-12-12 23:04:52 -08:00
parent 8bbf05dcf0
commit 41a85a0553
18 changed files with 260 additions and 78 deletions

View File

@ -11,11 +11,11 @@
#include "ui/PokerGameTextbox.hpp"
#include "visualnovel/VisualNovelManager.hpp"
#include "visualnovel/events/VisualNovelTextboxEvent.hpp"
#include "visualnovel/events/VisualNovelPauseEvent.hpp"
#include "visualnovel/events/VisualNovelFadeEvent.hpp"
#include "poker/PokerGame.hpp"
#include "visualnovel/events/PokerBetLoopEvent.hpp"
#include "visualnovel/events/PokerInitialEvent.hpp"
#include "visualnovel/events/SimpleLoopEvent.hpp"
#include "ui/PokerPlayerDisplay.hpp"
#include "prefabs/VNPenny.hpp"
@ -45,7 +45,6 @@ namespace Dawn {
// UI
auto canvas = UICanvas::createCanvas(this);
auto textbox = PokerGameTextbox::create(canvas);
auto vnFader = VisualNovelFader::create(canvas);
// VN Manager
auto vnManagerItem = this->createSceneItem();
@ -62,10 +61,16 @@ namespace Dawn {
uiPlayer->setTransform(UI_COMPONENT_ALIGN_START, UI_COMPONENT_ALIGN_START, glm::vec4(i * 220, 0, 220, 200), 0);
uiPlayer->setPlayer(player->getComponent<PokerPlayer>());
}
auto vnFader = VisualNovelFader::create(canvas);
auto betting = vnManager
->setEvent(new VisualNovelFadeEvent(
vnManager, COLOR_BLACK, true, &easeOutCubic, 5.0f
vnManager, COLOR_BLACK, true, &easeOutCubic, 0.0f
))
->then(new VisualNovelPauseEvent(vnManager, 1.0f))
->then(new VisualNovelFadeEvent(
vnManager, COLOR_BLACK, false, &easeOutCubic, 1.0f
))
->then(new VisualNovelTextboxEvent(vnManager, "Starting Game"))
->then(new PokerNewGameEvent(vnManager))

View File

@ -24,7 +24,7 @@ PokerPlayerDisplay::PokerPlayerDisplay(UICanvas *canvas) :
this->border.setTransform(
UI_COMPONENT_ALIGN_STRETCH, UI_COMPONENT_ALIGN_STRETCH,
glm::vec4(0, 0, 0, 0),
-0.0f
0.0f
);
// Border Inner