Search Results for

    Show / Hide Table of Contents

    Class DialogueManagerBase<ChoiceButtonT>

    Inheritance
    Object
    DialogueManagerBase<ChoiceButtonT>
    SimpleDialogueManager
    Namespace: Ibralogue
    Assembly: cs.temp.dll.dll
    Syntax
    public abstract class DialogueManagerBase<ChoiceButtonT> : MonoBehaviour where ChoiceButtonT : Component
    Type Parameters
    Name Description
    ChoiceButtonT

    Fields

    _choiceButtonInstances

    Declaration
    protected List<DialogueManagerBase<ChoiceButtonT>.ChoiceButtonHandle> _choiceButtonInstances
    Field Value
    Type Description
    List<DialogueManagerBase.ChoiceButtonHandle<>>

    _currentConversation

    Declaration
    protected Conversation _currentConversation
    Field Value
    Type Description
    Conversation

    _lineIndex

    Declaration
    protected int _lineIndex
    Field Value
    Type Description
    Int32

    _linePlaying

    Declaration
    protected bool _linePlaying
    Field Value
    Type Description
    Boolean

    choiceButton

    Declaration
    protected ChoiceButtonT choiceButton
    Field Value
    Type Description
    ChoiceButtonT

    choiceButtonHolder

    Declaration
    protected Transform choiceButtonHolder
    Field Value
    Type Description
    Transform

    nameText

    Declaration
    protected TextMeshProUGUI nameText
    Field Value
    Type Description
    TextMeshProUGUI

    scrollSpeed

    Declaration
    protected float scrollSpeed
    Field Value
    Type Description
    Single

    sentenceText

    Declaration
    protected TextMeshProUGUI sentenceText
    Field Value
    Type Description
    TextMeshProUGUI

    speakerPortrait

    Declaration
    protected Image speakerPortrait
    Field Value
    Type Description
    Image

    Properties

    OnConversationEnd

    Declaration
    public UnityEvent OnConversationEnd { get; set; }
    Property Value
    Type Description
    UnityEvent

    OnConversationStart

    Declaration
    public UnityEvent OnConversationStart { get; set; }
    Property Value
    Type Description
    UnityEvent

    ParsedConversations

    Declaration
    public List<Conversation> ParsedConversations { get; protected set; }
    Property Value
    Type Description
    List<Conversation>

    Methods

    ClearChoiceButton(DialogueManagerBase<ChoiceButtonT>.ChoiceButtonHandle)

    Declaration
    protected virtual void ClearChoiceButton(DialogueManagerBase<ChoiceButtonT>.ChoiceButtonHandle buttonHandle)
    Parameters
    Type Name Description
    DialogueManagerBase.ChoiceButtonHandle<> buttonHandle

    ClearDialogueBox()

    Clears all text and Images in the dialogue box.

    Declaration
    protected virtual void ClearDialogueBox()

    CreateChoiceButton()

    Declaration
    protected virtual ChoiceButtonT CreateChoiceButton()
    Returns
    Type Description
    ChoiceButtonT

    DisplayChoices()

    Uses the Unity UI system and TextMeshPro to render choice buttons.

    Declaration
    protected void DisplayChoices()

    DisplayDialogue()

    Declaration
    protected virtual IEnumerator DisplayDialogue()
    Returns
    Type Description
    IEnumerator

    DisplaySpeakerImage()

    Sets the speaker image and makes the Image transparent if there is no speaker image.

    Declaration
    protected void DisplaySpeakerImage()

    GetDialogueMethods()

    Gets all methods for the current assembly, other specified assemblies, or all assemblies, and checks them against the DialogueFunction attribute.

    Declaration
    protected IEnumerable<MethodInfo> GetDialogueMethods()
    Returns
    Type Description
    IEnumerable<MethodInfo>

    InvokeFunctions(Dictionary<Int32, String>)

    Looks for functions and invokes them in a given line. The function also handles multiple return types and the parameters passed in.

    Declaration
    protected virtual void InvokeFunctions(Dictionary<int, string> functionInvocations)
    Parameters
    Type Name Description
    Dictionary<Int32, String> functionInvocations

    The invocations inside the current line being displayed.

    JumpTo(String)

    Jumps to a given conversation in the dialogue by using its name.

    Declaration
    public void JumpTo(string conversationName)
    Parameters
    Type Name Description
    String conversationName

    Name as seen in the DialogueAsset

    PrepareChoiceButton(DialogueManagerBase<ChoiceButtonT>.ChoiceButtonHandle, Choice)

    Declaration
    protected abstract void PrepareChoiceButton(DialogueManagerBase<ChoiceButtonT>.ChoiceButtonHandle handle, Choice choice)
    Parameters
    Type Name Description
    DialogueManagerBase.ChoiceButtonHandle<> handle
    Choice choice

    RemoveChoiceButton(DialogueManagerBase<ChoiceButtonT>.ChoiceButtonHandle)

    Declaration
    protected virtual void RemoveChoiceButton(DialogueManagerBase<ChoiceButtonT>.ChoiceButtonHandle buttonHandle)
    Parameters
    Type Name Description
    DialogueManagerBase.ChoiceButtonHandle<> buttonHandle

    StartConversation(DialogueAsset, Int32)

    Starts a dialogue by parsing all the text in a file, clearing the dialogue box and starting the DisplayDialogue() function.

    Declaration
    public void StartConversation(DialogueAsset interactionDialogue, int startIndex = 0)
    Parameters
    Type Name Description
    DialogueAsset interactionDialogue

    The dialogue file that we want to use in the conversation

    Int32 startIndex

    The index of the conversation you want to start.

    StopConversation()

    Stops the currently playing conversation and clears the dialogue box.

    Declaration
    public void StopConversation()

    TryDisplayNextLine()

    Clears the dialogue box and displays the next line if no sentences are left in the current one.

    Declaration
    public void TryDisplayNextLine()
    In This Article
    Back to top Ibralogue Docs