PixelCrushers.DialogueSystem.ConversationState Class Reference

The current state of a conversation, which can also be thought of as the current position in the dialogue tree. More...

Collaboration diagram for PixelCrushers.DialogueSystem.ConversationState:

Public Member Functions

bool HasValidNPCResponse ()
 Returns true if any NPC responses are valid (i.e., enabled).
 
bool HasValidPCResponses ()
 Returns true if any PC responses are valid (i.e., enabled).
 
 ConversationState (Subtitle subtitle, Response[] npcResponses, Response[] pcResponses, bool isGroup=false)
 Initializes a new ConversationState.
 
DialogueEntry GetRandomNPCEntry (bool noDuplicate=false)
 

Public Attributes

Subtitle subtitle
 The subtitle of the current dialogue entry.
 
Response[] npcResponses
 The NPC responses linked from the current dialogue entry.
 
Response[] pcResponses
 The PC responses linked from the current dialogue entry.
 

Properties

bool hasNPCResponse [get]
 Indicates whether the current state has any NPC responses.
 
Response firstNPCResponse [get]
 Gets the first NPC response.
 
bool hasPCResponses [get]
 Indicates whether the current state has any PC responses.
 
bool hasPCAutoResponse [get]
 Indicates whether the current state has a PC auto-response, which means it has only a single response and that response does not specify "force menu.".
 
bool hasForceAutoResponse [get]
 Indicates whether the current state has a PC response with an [auto] tag.
 
Response pcAutoResponse [get]
 Gets the PC auto response.
 
bool hasAnyResponses [get]
 Indicates whether this state has any responses (PC or NPC).
 
bool isGroup [get, set]
 Indicates whether this state corresponds to a group dialogue entry.
 

Detailed Description

The current state of a conversation, which can also be thought of as the current position in the dialogue tree.

Constructor & Destructor Documentation

◆ ConversationState()

PixelCrushers.DialogueSystem.ConversationState.ConversationState ( Subtitle  subtitle,
Response[]  npcResponses,
Response[]  pcResponses,
bool  isGroup = false 
)
inline

Initializes a new ConversationState.

Parameters
subtitleSubtitle of the current dialogue entry.
npcResponsesNPC responses.
pcResponsesPC responses.

Member Function Documentation

◆ GetRandomNPCEntry()

DialogueEntry PixelCrushers.DialogueSystem.ConversationState.GetRandomNPCEntry ( bool  noDuplicate = false)
inline

◆ HasValidNPCResponse()

bool PixelCrushers.DialogueSystem.ConversationState.HasValidNPCResponse ( )
inline

Returns true if any NPC responses are valid (i.e., enabled).

◆ HasValidPCResponses()

bool PixelCrushers.DialogueSystem.ConversationState.HasValidPCResponses ( )
inline

Returns true if any PC responses are valid (i.e., enabled).

Member Data Documentation

◆ npcResponses

Response [] PixelCrushers.DialogueSystem.ConversationState.npcResponses

The NPC responses linked from the current dialogue entry.

This array may be empty. Typically, a conversation state will have either NPC responses or PC responses but not both.

◆ pcResponses

Response [] PixelCrushers.DialogueSystem.ConversationState.pcResponses

The PC responses linked from the current dialogue entry.

This array may be empty. Typically, a conversation state will have either NPC responses or PC responses but not both.

◆ subtitle

Subtitle PixelCrushers.DialogueSystem.ConversationState.subtitle

The subtitle of the current dialogue entry.

Property Documentation

◆ firstNPCResponse

Response PixelCrushers.DialogueSystem.ConversationState.firstNPCResponse
get

Gets the first NPC response.

The first NPC response.

◆ hasAnyResponses

bool PixelCrushers.DialogueSystem.ConversationState.hasAnyResponses
get

Indicates whether this state has any responses (PC or NPC).

true if this instance has any responses; otherwise, false.

◆ hasForceAutoResponse

bool PixelCrushers.DialogueSystem.ConversationState.hasForceAutoResponse
get

Indicates whether the current state has a PC response with an [auto] tag.

◆ hasNPCResponse

bool PixelCrushers.DialogueSystem.ConversationState.hasNPCResponse
get

Indicates whether the current state has any NPC responses.

true if this instance has any NPC responses; otherwise, false.

◆ hasPCAutoResponse

bool PixelCrushers.DialogueSystem.ConversationState.hasPCAutoResponse
get

Indicates whether the current state has a PC auto-response, which means it has only a single response and that response does not specify "force menu.".

true if this instance has PC auto response; otherwise, false.

◆ hasPCResponses

bool PixelCrushers.DialogueSystem.ConversationState.hasPCResponses
get

Indicates whether the current state has any PC responses.

true if this instance has PC responses; otherwise, false.

◆ isGroup

bool PixelCrushers.DialogueSystem.ConversationState.isGroup
getset

Indicates whether this state corresponds to a group dialogue entry.

true if a group; otherwise, false.

◆ pcAutoResponse

Response PixelCrushers.DialogueSystem.ConversationState.pcAutoResponse
get

Gets the PC auto response.

The PC auto response, or null if the state doesn't have one.


The documentation for this class was generated from the following file: