예제 #1
0
        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();
        }
예제 #2
0
 public override void Open(Action onOpened)
 {
     speakerL = null;
     speakerR = null;
     Pops.Clear();
     onOpened?.Invoke();
 }
예제 #3
0
 public DialogShowMessageSettings(ISpeakerInfo speakerInfo, string face, string message, bool allowSpeedUp,
                                  bool allowSkipping)
 {
     SpeakerInfo   = speakerInfo;
     Face          = face;
     Message       = message;
     AllowSpeedUp  = allowSpeedUp;
     AllowSkipping = allowSkipping;
 }
예제 #4
0
        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();
        }
예제 #5
0
 private void SetSpeaker(ISpeakerInfo s)
 {
     if (s == speakerL || s == speakerR)
     {
         return;
     }
     else
     {
         if (speakerL == null)
         {
             speakerL = s;
         }
         else
         {
             speakerR = s;
         }
     }
 }