示例#1
0
    public void SwitchDialogues(LoopDialogue newDialogue)
    {
        myDialogue = newDialogue;

        if (myDialogue != null)
        {
            myDialogue = ScriptableObject.Instantiate(myDialogue);
            dialogueMap.Clear();

            foreach (var dobj in myDialogue.content)
            {
                dialogueMap.Add(dobj.loop, dobj);
            }
        }
    }
示例#2
0
    // EXECUTION FUNCTIONS
    private void Awake()
    {
        myText   = GetComponent <Text>();
        animator = GetComponent <Animator>();

        gameObject.SetActive(false);

        if (myDialogue != null)
        {
            myDialogue = ScriptableObject.Instantiate(myDialogue);

            foreach (var dobj in myDialogue.content)
            {
                dialogueMap.Add(dobj.loop, dobj);
            }
        }
    }