void RunDialog(MissionDialog dlg) { var netdlg = new NetDlgLine[dlg.Lines.Count]; for (int i = 0; i < dlg.Lines.Count; i++) { var d = dlg.Lines[i]; var src = msn.Ships.First((x) => x.Nickname.Equals(d.Source, StringComparison.OrdinalIgnoreCase)); var npc = msn.NPCs.First((x) => x.Nickname.Equals(src.NPC, StringComparison.OrdinalIgnoreCase)); var hash = FLHash.CreateID(d.Line); lock (waitingLines) { waitingLines.Add(new PendingLine() { Hash = hash, Line = d.Line }); } netdlg[i] = new NetDlgLine() { Voice = npc.Voice, Hash = hash }; } player.PlayDialog(netdlg); }
/// <summary> /// ミッションの遷移ボタンをクリック時 /// </summary> public void OnTapMissionButton() { if (!isMaxPossession) { MissionDialog.Open(this.missionDialog, null); } else { OpenPresentBoxOverDialog(); } }
public void OnClickMissionButton() { MissionDialog.Open(this.missionDialogPreafab, (content) => { if (!string.IsNullOrEmpty(content.nextSceneName)) { this.onMissionChallenge?.Invoke(content); this.Close(); } }); }
private void Awake() { buttonImage = GetComponent <Image>(); button = GetComponent <Button>(); missionDialog = FindObjectOfType <MissionDialog>(); humanController = FindObjectOfType <HumanController>(); if (abilityConfig) { TurnOnButton(); } else { TurnOffButton(); } }
/// <summary> /// 開く /// </summary> public static void Open(MissionDialog prefab, Action <MissionDialog> onClose) { //ミッション一覧取得通信 MissionApi.CallMissionProgressApi((response) => { //ダイアログ開く var dialog = SharedUI.Instance.ShowSimpleDialog(); dialog.titleText.text = Masters.LocalizeTextDB.Get("MissionTitle"); dialog.closeButtonEnabled = true; var content = dialog.AddContent(prefab); content.BuildView(response, dialog); dialog.onClose += () => onClose?.Invoke(content); }); }
void RunDialog(MissionDialog dlg, int index = 0) { if (index >= dlg.Lines.Count) { return; } var d = dlg.Lines[index]; var src = msn.Ships.First((x) => x.Nickname.Equals(d.Source, StringComparison.OrdinalIgnoreCase)); var npc = msn.NPCs.First((x) => x.Nickname.Equals(src.NPC, StringComparison.OrdinalIgnoreCase)); var hash = FLHash.CreateID(d.Line); session.Game.Sound.PlayVoiceLine(npc.Voice, hash, () => { finishedLines.Add(d.Line); RunDialog(dlg, index + 1); }); }