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"); }
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(); }
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(); }