Beispiel #1
0
    void MakeNewDialog(string newDialog)
    {
        DialogObject newDialogObject = Instantiate(dialogPrefab, dialogHolder.transform)
                                       .GetComponent <DialogObject>();

        newDialogObject.Setup(newDialog);
    }
Beispiel #2
0
    IEnumerator MakeNewDialog(string newDialog)
    {
        // Instantiates the dialog object (the prefab) on the dialog holder
        scrollInProgress = true;
        DialogObject newDialogObject = Instantiate(dialogPrefab, dialogHolder.transform).GetComponent <DialogObject>();

        StartCoroutine(ScrollCo());
        float r = newDialogObject.Setup(newDialog);

        yield return(new WaitForSeconds(r));

        scrollInProgress = false;
        afterDialog();
    }