35 lines
909 B
C++
35 lines
909 B
C++
#ifndef QWSTARTDIALOGUEEVENT_H
|
|
#define QWSTARTDIALOGUEEVENT_H
|
|
|
|
#include "qw_abstractevent.h"
|
|
|
|
/* QWStartDialogueEvent
|
|
* Starts a game-freezing dialogue by moving QWScene from gameplay state. */
|
|
|
|
class QWAbstractDialogueManager;
|
|
class QWAbstractGameDialogue;
|
|
|
|
class QWStartDialogueEvent : public QWAbstractEvent
|
|
{
|
|
private:
|
|
QWAbstractDialogueManager *ptr_dialogue_manager;
|
|
std::shared_ptr<QWAbstractGameDialogue> ptr_dialogue;
|
|
|
|
public:
|
|
explicit QWStartDialogueEvent(const std::shared_ptr<QWAbstractGameDialogue> &dialogue);
|
|
virtual ~QWStartDialogueEvent() override {}
|
|
|
|
void execute() override;
|
|
|
|
////////////////////////
|
|
|
|
void setDialogueManager(QWAbstractDialogueManager *dialogman) noexcept;
|
|
QWAbstractDialogueManager *dialogueManager() const noexcept;
|
|
|
|
////////////////////////
|
|
|
|
void writeToJson(QJsonObject &event_data) override;
|
|
};
|
|
|
|
#endif // QWSTARTDIALOGUEEVENT_H
|