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);
        }
Esempio n. 2
0
 /// <summary>
 /// ミッションの遷移ボタンをクリック時
 /// </summary>
 public void OnTapMissionButton()
 {
     if (!isMaxPossession)
     {
         MissionDialog.Open(this.missionDialog, null);
     }
     else
     {
         OpenPresentBoxOverDialog();
     }
 }
Esempio n. 3
0
 public void OnClickMissionButton()
 {
     MissionDialog.Open(this.missionDialogPreafab, (content) =>
     {
         if (!string.IsNullOrEmpty(content.nextSceneName))
         {
             this.onMissionChallenge?.Invoke(content);
             this.Close();
         }
     });
 }
Esempio n. 4
0
 private void Awake()
 {
     buttonImage     = GetComponent <Image>();
     button          = GetComponent <Button>();
     missionDialog   = FindObjectOfType <MissionDialog>();
     humanController = FindObjectOfType <HumanController>();
     if (abilityConfig)
     {
         TurnOnButton();
     }
     else
     {
         TurnOffButton();
     }
 }
Esempio n. 5
0
    /// <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);
        });
    }
Esempio n. 6
0
        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);
            });
        }