C# Class Fungus.ConversationManager

Helper class to manage parsing and executing the conversation format.
Inheritance: MonoBehaviour
ファイルを表示 Open project: CG-Tespy/Fungus-Slot-based-Narrative-System Class Usage Examples

Protected Properties

Property Type Description
characters Fungus.Character[]
exitSayWait bool

Public Methods

Method Description
ConversationManager ( ) : System.Collections
DoConversation ( string conv ) : IEnumerator

Parse and execute a conversation string.

PopulateCharacterCache ( ) : void

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

PreParse ( string conv ) : List
PreParse ( string conv, System.Action itemAction ) : void

Protected Methods

Method Description
CreateConversationItem ( Array sayParams, string text, Character currentCharacter ) : ConversationItem

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

GetSayDialog ( Character character ) : SayDialog
Parse ( string conv ) : List
Split ( string stringToSplit ) : string[]

Method Details

ConversationManager() public method

public ConversationManager ( ) : System.Collections
return System.Collections

CreateConversationItem() protected method

Using the string of say parameters before the ':', set the current character, position and portrait if provided.
protected CreateConversationItem ( Array sayParams, string text, Character currentCharacter ) : ConversationItem
sayParams Array The list of say parameters.
text string The text for the character to say.
currentCharacter Character The currently speaking character.
return ConversationItem

DoConversation() public method

Parse and execute a conversation string.
public DoConversation ( string conv ) : IEnumerator
conv string
return IEnumerator

GetSayDialog() protected method

protected GetSayDialog ( Character character ) : SayDialog
character Character
return SayDialog

Parse() protected method

protected Parse ( string conv ) : List
conv string
return List

PopulateCharacterCache() public method

Caches the character objects in the scene for fast lookup during conversations.
public PopulateCharacterCache ( ) : void
return void

PreParse() public static method

public static PreParse ( string conv ) : List
conv string
return List

PreParse() public static method

public static PreParse ( string conv, System.Action itemAction ) : void
conv string
itemAction System.Action
return void

Split() protected static method

protected static Split ( string stringToSplit ) : string[]
stringToSplit string
return string[]

Property Details

characters protected_oe property

protected Character[],Fungus characters
return Fungus.Character[]

exitSayWait protected_oe property

protected bool exitSayWait
return bool