public override void ShowMessage(DialogShowMessageSettings settings, Action onNext) { ISpeakerInfo s = settings.SpeakerInfo; SetSpeaker(s); if (string.IsNullOrEmpty(settings.Message)) { onNext?.Invoke(); return; } GameObject popObj; if (s == speakerL) { popObj = Instantiate(popMessageL, popParent); } else { popObj = Instantiate(popMessageR, popParent); } var pop = popObj.GetComponent <TalkStyleDialogMessagePop>(); pop.SetMessage(settings, onNext); Pops.Add(pop); DestroyOldPops(); }
public override void Open(Action onOpened) { speakerL = null; speakerR = null; Pops.Clear(); onOpened?.Invoke(); }
public DialogShowMessageSettings(ISpeakerInfo speakerInfo, string face, string message, bool allowSpeedUp, bool allowSkipping) { SpeakerInfo = speakerInfo; Face = face; Message = message; AllowSpeedUp = allowSpeedUp; AllowSkipping = allowSkipping; }
public override void ShowMenu(DialogShowMenuSettings settings, Action <int> onSelected) { ISpeakerInfo s = settings.SpeakerInfo; SetSpeaker(s); GameObject popObj; popObj = Instantiate(popMenuL, popParent); var pop = popObj.GetComponent <TalkStyleDialogMenuPop>(); pop.Open(settings, onSelected); Pops.Add(pop); DestroyOldPops(); }
private void SetSpeaker(ISpeakerInfo s) { if (s == speakerL || s == speakerR) { return; } else { if (speakerL == null) { speakerL = s; } else { speakerR = s; } } }