44 lines
822 B
C++
44 lines
822 B
C++
#ifndef QUESTEVENT_H
|
|
#define QUESTEVENT_H
|
|
|
|
#include <QJsonObject>
|
|
#include <QJsonArray>
|
|
|
|
#include <QDebug>
|
|
#include "../qw_tagholder.h"
|
|
|
|
/* QWAbstractEvent
|
|
* Interface for all in-game events. The core of game logic process. */
|
|
|
|
class QWAbstractEvent : public QWTagHolder
|
|
{
|
|
public:
|
|
QWAbstractEvent();
|
|
virtual ~QWAbstractEvent() override = 0;
|
|
|
|
virtual void execute() = 0;
|
|
|
|
////////////////////////
|
|
|
|
virtual void writeToJson(QJsonObject &savejson) override = 0;
|
|
};
|
|
|
|
enum EVENT_TYPE
|
|
{
|
|
CHANGE_LOCATION,
|
|
SWITCH_EVENTS, // <- requires other events to be initialized
|
|
DELETE_FROM_INVENTORY,
|
|
END_LEVEL,
|
|
PICKUP_ITEM,
|
|
PLAY_SOUND,
|
|
PLAY_MUSIC,
|
|
CHANGE_TRIGGER_PROPERTIES,
|
|
NEW_GAME,
|
|
QUIT_GAME,
|
|
START_DIALOGUE,
|
|
ADD_TRIGGER,
|
|
REMOVE_TRIGGER
|
|
};
|
|
|
|
#endif // QUESTEVENT_H
|