예제 #1
0
    public void UpdateToCurrentFrame()
    {
        currentState.Reset();
        currentState.dialogueUuid.value = dialogueValues.uuid;
        previousText = "";
        DialogueActionData data;
        DialogueAction     da;
        int stopPoint = selAction + 1;       //(dialogueValues.actions[selFrame].type == DActionType.MOVEMENT) ? selFrame : selFrame+1;

        for (int i = 0; i < stopPoint; i++)
        {
            data = dialogueValues.actions[i];
            da   = DialogueAction.CreateAction(data.type);
            da.Act(currentState, data);
            if (data.type == DActionType.SET_TEXT)
            {
                previousText = (!data.boolValue) ? previousText + data.text[1] : data.text[1];
            }
        }

        currentState.backgroundChanged.Invoke();
        currentState.bkgMusicChanged.Invoke();
        currentState.characterChanged.Invoke();
        currentState.closeupChanged.Invoke();
        Debug.Log("TEXT:  " + currentState.dialogueText.value);

        Debug.Log("Updated to current state");
    }
예제 #2
0
    public void StartDialogue()
    {
        if (!overrideActionNumber.value)
        {
            dialogueEntry       = (DialogueEntry)currentDialogue.value;
            currentAction.value = 0;
            scene.Reset();
        }
        else
        {
            dialogueEntry = wpEntry;
            overrideActionNumber.value = false;
        }
        isWaiting = false;
        NextFrame();

        scene.backgroundChanged.Invoke();
        //scene.bkgMusicChanged.Invoke();
        scene.characterChanged.Invoke();
        scene.dialogueTextChanged.Invoke();
    }
예제 #3
0
    void Start()
    {
        scene = GetComponent <DialogueScene>();
        dialogueLibrary.initialized = false;
        dialogueLibrary.GenerateDictionary();
        dialogueEntry = (DialogueEntry)dialogueLibrary.GetEntry(dialogueUuid.value);
        if (!overrideActionNumber.value)
        {
            currentAction.value = 0;
            scene.Reset();
        }
        else
        {
            overrideActionNumber.value = false;
        }
        NextFrame();

        scene.backgroundChanged.Invoke();
        scene.bkgMusicChanged.Invoke();
        scene.characterChanged.Invoke();
        scene.closeupChanged.Invoke();
        scene.dialogueTextChanged.Invoke();
    }