v3.6.1 Documentation
Fungus.ConversationManager Class Reference

Helper class to manage parsing and executing the conversation format. More...

Classes

struct  ConversationItem
 

Public Member Functions

virtual void PopulateCharacterCache ()
 Caches the character objects in the scene for fast lookup during conversations. More...
 
virtual IEnumerator DoConversation (string conv)
 Parse and execute a conversation string. More...
 

Protected Member Functions

virtual SayDialog GetSayDialog (Character character)
 
virtual List< ConversationItemParse (string conv)
 
virtual ConversationItem CreateConversationItem (string[] sayParams, string text, Character currentCharacter)
 Using the string of say parameters before the ':', set the current character, position and portrait if provided. More...
 

Static Protected Member Functions

static string [] Split (string stringToSplit)
 Splits the string passed in by the delimiters passed in. More...
 

Protected Attributes

Character [] characters
 
bool exitSayWait
 

Detailed Description

Helper class to manage parsing and executing the conversation format.

Definition at line 15 of file ConversationManager.cs.

Member Function Documentation

◆ CreateConversationItem()

virtual ConversationItem Fungus.ConversationManager.CreateConversationItem ( string []  sayParams,
string  text,
Character  currentCharacter 
)
protectedvirtual

Using the string of say parameters before the ':', set the current character, position and portrait if provided.

Returns
The conversation item.
Parameters
sayParamsThe list of say parameters.
textThe text for the character to say.
currentCharacterThe currently speaking character.

Definition at line 147 of file ConversationManager.cs.

◆ DoConversation()

virtual IEnumerator Fungus.ConversationManager.DoConversation ( string  conv)
virtual

Parse and execute a conversation string.

Definition at line 281 of file ConversationManager.cs.

◆ GetSayDialog()

virtual SayDialog Fungus.ConversationManager.GetSayDialog ( Character  character)
protectedvirtual

Definition at line 79 of file ConversationManager.cs.

◆ Parse()

virtual List<ConversationItem> Fungus.ConversationManager.Parse ( string  conv)
protectedvirtual

Definition at line 98 of file ConversationManager.cs.

◆ PopulateCharacterCache()

virtual void Fungus.ConversationManager.PopulateCharacterCache ( )
virtual

Caches the character objects in the scene for fast lookup during conversations.

Definition at line 272 of file ConversationManager.cs.

◆ Split()

static string [] Fungus.ConversationManager.Split ( string  stringToSplit)
staticprotected

Splits the string passed in by the delimiters passed in.

Quoted sections are not split, and all tokens have whitespace trimmed from the start and end.

Definition at line 36 of file ConversationManager.cs.

Member Data Documentation

◆ characters

Character [] Fungus.ConversationManager.characters
protected

Definition at line 28 of file ConversationManager.cs.

◆ exitSayWait

bool Fungus.ConversationManager.exitSayWait
protected

Definition at line 30 of file ConversationManager.cs.


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