Class AbstractDialogueSystem
Abstract class for dialogue system integration. Concrete implementations are used by NonPlayerCharacter component for scripted replies.
Namespace: NPCEngine.Components
Assembly: cs.temp.dll.dll
Syntax
public abstract class AbstractDialogueSystem : MonoBehaviour
Methods
CurrentNodeIsPlayer()
Returns true if it's players turn in the dialogue.
Declaration
public abstract bool CurrentNodeIsPlayer()
Returns
Type | Description |
---|---|
Boolean |
CurrentNodeNPCAudio()
Get the current node's audio for the NPC line (Never called for player). Return null if no audio is set or if the node is player.
Declaration
public abstract AudioClip CurrentNodeNPCAudio()
Returns
Type | Description |
---|---|
AudioClip |
CurrentNodeNPCLine()
If the current node is NPC, return the NPC's line. else return empty string.
Declaration
public abstract string CurrentNodeNPCLine()
Returns
Type | Description |
---|---|
String |
CurrentNodeThreshold()
Get the semantic similarity threshold for the current node in the dialogue. Return -1 if no threshold is set.
Declaration
public abstract float CurrentNodeThreshold()
Returns
Type | Description |
---|---|
Single |
EndDialogue()
Will be called when dialogue ends.
Declaration
public abstract void EndDialogue()
GetCurrentNodeOptions()
Get the lines associated with the current node in the dialogue.
Declaration
public abstract List<string> GetCurrentNodeOptions()
Returns
Type | Description |
---|---|
List<String> |
GetCurrentNodeTopics()
Get the short abstract descriptions of the lines associated with the current node in the dialogue.
Declaration
public abstract List<string> GetCurrentNodeTopics()
Returns
Type | Description |
---|---|
List<String> |
IsEnd()
Declaration
public abstract bool IsEnd()
Returns
Type | Description |
---|---|
Boolean |
Next()
Move to the next node in the dialogue.
Declaration
public abstract void Next()
SelectOption(Int32)
Select a line from the current node in the dialogue.
Declaration
public abstract void SelectOption(int optionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | optionId |
StartDialogue()
Will be called when dialogue starts.
Declaration
public abstract void StartDialogue()