A quest node is a task or stage in a quest. More...
Public Member Functions | |
string | GetEditorName () |
QuestNode () | |
QuestNode (StringField id, StringField internalName, QuestNodeType nodeType, bool isOptional=false) | |
void | InitializeAsStartNode (string questID) |
void | CloneSubassetsInto (QuestNode copy, Quest quest=null) |
void | DestroySubassets () |
void | InitializeRuntimeReferences (Quest quest) |
void | ConnectRuntimeNodeReferences () |
void | SetRuntimeNodeReferences () |
QuestNodeState | GetState () |
Returns the current state of the quest node. | |
void | SetState (QuestNodeState newState, bool informListeners=true) |
Sets the quest node to a quest state and performs all related activities such as enabling connections and executing actions. | |
void | SetStateRaw (QuestNodeState state) |
Sets the internal state value without performing any state change processing. | |
QuestStateInfo | GetStateInfo (QuestNodeState state) |
Returns the state info associated with a quest node state. | |
void | SetConditionChecking (bool enable) |
Starts or stops condition checking on condition nodes. | |
void | ResetConditions () |
bool | HasContent (QuestContentCategory category) |
Checks if there is any UI content for a specific category. | |
List< QuestContent > | GetContentList (QuestContentCategory category) |
Gets the UI content for a specific category. | |
Static Public Member Functions | |
static void | CloneSubassets (List< QuestNode > original, List< QuestNode > copy, Quest quest=null) |
static void | DestroyListSubassets (List< QuestNode > nodes) |
Public Attributes | |
List< QuestNode > | m_childList |
Static Public Attributes | |
const float | DefaultNodeWidth = 120 |
const float | DefaultNodeHeight = 48 |
const float | ShortNodeHeight = 35 |
const float | DefaultStartNodeX = 200 |
const float | DefaultStartNodeY = 20 |
Properties | |
StringField | id [get, set] |
Internal ID of the quest node, used to reference quest nodes in scripts. | |
StringField | internalName [get, set] |
Name for your internal reference; shown only in the editor. | |
QuestNodeType | nodeType [get, set] |
Type of node, which determines some of its behavior. | |
bool | isEndNodeType [get] |
Specifies that the node is a type that terminates the quest tree. | |
bool | isConnectionNodeType [get] |
Specifies that the node is a type that can connect to other nodes. | |
bool | isOptional [get, set] |
Completion of this quest node is optional. | |
StringField | speaker [get, set] |
Speaker of this node's dialogue content. | |
List< QuestStateInfo > | stateInfoList [get, set] |
Info (actions & UI content) for a specific quest state. | |
QuestConditionSet | conditionSet [get, set] |
Conditions required for the node's state to become true. | |
List< int > | childIndexList [get, set] |
Indices into the quest's node list. | |
Quest | quest [get, set] |
The Quest that this node belongs to. | |
List< QuestNode > | childList [get, set] |
References to the child nodes linked from this node. | |
List< QuestNode > | parentList [get, set] |
References to the parent nodes that link to this node. | |
List< QuestNode > | optionalParentList [get, set] |
The subset of parents that are marked optional. | |
List< QuestNode > | nonoptionalParentList [get, set] |
The subset of parents that are not marked optional. | |
TagDictionary | tagDictionary [get, set] |
Dictionary of tags defined in this quest node and their values. | |
Rect | canvasRect [get, set] |
Position of the quest node in the Quest Editor window. | |
Events | |
QuestNodeParameterDelegate | stateChanged = delegate { } |
Invoked when the node changes state. | |
A quest node is a task or stage in a quest.
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
Gets the UI content for a specific category.
category | The content category (Dialogue, Journal, etc.). |
|
inline |
|
inline |
Returns the current state of the quest node.
|
inline |
Returns the state info associated with a quest node state.
|
inline |
Checks if there is any UI content for a specific category.
category | The content category (Dialogue, Journal, etc.). |
|
inline |
|
inline |
|
inline |
|
inline |
Starts or stops condition checking on condition nodes.
enable | Specifies whether to start (enable) or stop. |
|
inline |
|
inline |
Sets the quest node to a quest state and performs all related activities such as enabling connections and executing actions.
This may cause other nodes to advance their states, too.
newState | New state. |
|
inline |
Sets the internal state value without performing any state change processing.
|
static |
|
static |
|
static |
|
static |
List<QuestNode> PixelCrushers.QuestMachine.QuestNode.m_childList |
|
static |
|
getset |
Position of the quest node in the Quest Editor window.
|
getset |
Indices into the quest's node list.
Since Unity can't serialize nested types, such as a QuestNode reference inside the QuestNode class, we use a list of indices to record connections between nodes for serialization. At runtime, we use this list of indices to construct a list of QuestNode references.
|
getset |
References to the child nodes linked from this node.
|
getset |
Conditions required for the node's state to become true.
|
getset |
Internal ID of the quest node, used to reference quest nodes in scripts.
|
getset |
Name for your internal reference; shown only in the editor.
|
get |
Specifies that the node is a type that can connect to other nodes.
|
get |
Specifies that the node is a type that terminates the quest tree.
|
getset |
Completion of this quest node is optional.
|
getset |
Type of node, which determines some of its behavior.
|
getset |
The subset of parents that are not marked optional.
|
getset |
The subset of parents that are marked optional.
|
getset |
References to the parent nodes that link to this node.
|
getset |
The Quest that this node belongs to.
|
getset |
Speaker of this node's dialogue content.
If unassigned, the quest giver is the speaker.
|
getset |
Info (actions & UI content) for a specific quest state.
This list is indexed by the int value of the QuestState enum, such as stateInfoList[(int)QuestState.Active]
.
|
getset |
Dictionary of tags defined in this quest node and their values.
QuestNodeParameterDelegate PixelCrushers.QuestMachine.QuestNode.stateChanged = delegate { } |
Invoked when the node changes state.