Starting new VN Structure
This commit is contained in:
28
archive/visualnovel/events/timing/VisualNovelPauseEvent.cpp
Normal file
28
archive/visualnovel/events/timing/VisualNovelPauseEvent.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
// 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() {
|
||||
|
||||
}
|
Reference in New Issue
Block a user