Represents a game quest.
More...
#include <Quest.h>
|
| Quest (const std::string &title, const std::string &description) |
| Initializes a new quest with the given title and description (and an empty story) More...
|
|
| Quest (const std::string &title, const std::string &description, const std::string &story) |
| Initializes a new quest with the given title, description and story. More...
|
|
virtual | ~Quest () |
|
std::string | GetDescription () const |
| Returns the quest's description. More...
|
|
ID | GetId () const |
| Returns the quest's unique ID. More...
|
|
std::string | GetStory () const |
| Returns the quest's backstory. More...
|
|
std::string | GetTitle () const |
| Returns the quest's title. More...
|
|
virtual std::string | GetType () const =0 |
| Returns the type of the quest. More...
|
|
virtual QuestTickResult | Tick (float delta, const WorldModel &worldModel) |
| This method is called whenever the main quest system is ticked. More...
|
|
|
static const ID | NoID = 0 |
| Quests not registered with the quest system have this id. More...
|
|
|
| Quest (ID id, const std::string &title, const std::string &description, const std::string &story) |
|
cereal::NameValuePair< const std::string & > | getCerealDescription () const |
|
cereal::NameValuePair< const ID & > | getCerealId () const |
|
cereal::NameValuePair< const std::string & > | getCerealStory () const |
|
cereal::NameValuePair< const std::string & > | getCerealTitle () const |
|
Represents a game quest.
Instances of this class are immutable. The associated quest state can be changed from within the quest once it is ticked by the quest system.
Definition at line 106 of file Quest.h.
weave::Quest::Quest |
( |
const std::string & |
title, |
|
|
const std::string & |
description |
|
) |
| |
Initializes a new quest with the given title and description (and an empty story)
weave::Quest::Quest |
( |
const std::string & |
title, |
|
|
const std::string & |
description, |
|
|
const std::string & |
story |
|
) |
| |
Initializes a new quest with the given title, description and story.
virtual weave::Quest::~Quest |
( |
| ) |
|
|
inlinevirtual |
weave::Quest::Quest |
( |
ID |
id, |
|
|
const std::string & |
title, |
|
|
const std::string & |
description, |
|
|
const std::string & |
story |
|
) |
| |
|
protected |
cereal::NameValuePair<const std::string &> weave::Quest::getCerealDescription |
( |
| ) |
const |
|
inlineprotected |
cereal::NameValuePair<const ID &> weave::Quest::getCerealId |
( |
| ) |
const |
|
inlineprotected |
cereal::NameValuePair<const std::string &> weave::Quest::getCerealStory |
( |
| ) |
const |
|
inlineprotected |
cereal::NameValuePair<const std::string &> weave::Quest::getCerealTitle |
( |
| ) |
const |
|
inlineprotected |
std::string weave::Quest::GetDescription |
( |
| ) |
const |
Returns the quest's description.
ID weave::Quest::GetId |
( |
| ) |
const |
Returns the quest's unique ID.
std::string weave::Quest::GetStory |
( |
| ) |
const |
Returns the quest's backstory.
std::string weave::Quest::GetTitle |
( |
| ) |
const |
Returns the quest's title.
virtual std::string weave::Quest::GetType |
( |
| ) |
const |
|
pure virtual |
Returns the type of the quest.
This method is implemented by subclasses which return a unique quest type.
This method is called whenever the main quest system is ticked.
It allows subclasses to react to game events and queue changes via the QuestTickResult. Only ACTIVE quests can be ticked!
- Parameters
-
delta | The time elapsed since the last tick. |
worldModel | The world model, which can be used to search and check world entities. Changing them is only possible by returning the change in the result. |
const ID weave::Quest::NoID = 0 |
|
static |
Quests not registered with the quest system have this id.
Definition at line 111 of file Quest.h.
The documentation for this class was generated from the following file: