33 lines
755 B
C++
33 lines
755 B
C++
#ifndef QUESTCHANGELOCATIONEVENT_H
|
|
#define QUESTCHANGELOCATIONEVENT_H
|
|
|
|
#include "qw_abstractsceneevent.h"
|
|
|
|
/* QWChangeLocationEvent
|
|
* Moves player to new location by replacing scene triggers. */
|
|
|
|
class QWTrigger;
|
|
class QWLocation;
|
|
|
|
class QWChangeLocationEvent : public QWAbstractSceneEvent
|
|
{
|
|
private:
|
|
std::shared_ptr<QWLocation> target_location;
|
|
|
|
public:
|
|
explicit QWChangeLocationEvent(const std::shared_ptr<QWLocation> &location);
|
|
virtual ~QWChangeLocationEvent() override {}
|
|
|
|
void execute() override;
|
|
|
|
////////////////////////
|
|
|
|
void setLocation(const std::shared_ptr<QWLocation> &location) noexcept;
|
|
|
|
////////////////////////
|
|
|
|
void writeToJson(QJsonObject &event_data) override;
|
|
};
|
|
|
|
#endif // QUESTCHANGELOCATIONEVENT_H
|