Dawn/archive/visualnovel/events/timing/VisualNovelPauseEvent.cpp

28 lines
679 B
C++

// Copyright (c) 2022 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "VisualNovelPauseEvent.hpp"
#include "game/DawnGame.hpp"
using namespace Dawn;
VisualNovelPauseEvent::VisualNovelPauseEvent(
VisualNovelManager *manager, float_t duration
) : IVisualNovelEvent(manager) {
this->duration = duration;
}
void VisualNovelPauseEvent::onStart(IVisualNovelEvent *prev) {
this->time = 0;
}
bool_t VisualNovelPauseEvent::onUpdate() {
this->time += this->manager->getGame()->timeManager.delta;
return this->time < this->duration;
}
void VisualNovelPauseEvent::onEnd() {
}