Exemplo n.º 1
0
    public virtual void SetTextUi()
    {
        List <TextJourneyObject> texts = new List <TextJourneyObject>();

        Debug.LogWarning("Инициализировать данные для елементов с текстом");
        for (int i = 0; i < data.Count; i++)
        {
            TextJourneyObject temp = listTexts.Find(x => x.type == data[i].type);
            temp.targetText.SetText(data[i].text.GetColor(temp.targetText.notSelectColor));
            SetWork(data[i].text, data[i].type, temp);
            temp.targetText.gameObject.SetActive(true);
            texts.Add(temp);
        }

        List <string> notActiveType = new List <string>();

        Sort(out notActiveType);

        Debug.LogWarning("Выключить необходимые елементы");
        for (int i = 0; i < notActiveType.Count; i++)
        {
            TextJourneyObject temp = listTexts.Find(x => x.type == notActiveType[i]);
            if (temp != null)
            {
                temp.targetText.gameObject.SetActive(false);
            }
        }
    }
Exemplo n.º 2
0
 public virtual void WorkGood(TextJourneyObject textJourney)
 {
     EnterTextController.RemoveAll();
     if (textJourney.effect != null)
     {
         textJourney.effect.Show();
     }
     ClearUI();
 }
Exemplo n.º 3
0
 public void SetTextUi()
 {
     for (int i = 0; i < data.Count; i++)
     {
         TextJourneyObject temp = listTexts.Find(x => x.type == data[i].type);
         temp.targetText.SetText(data[i].text.GetColor(temp.targetText.notSelectColor));
         SetWork(data[i].text, data[i].type);
         temp.targetText.gameObject.SetActive(true);
     }
 }
Exemplo n.º 4
0
    protected void SetWork(string message, string type, TextJourneyObject textJourney)
    {
        Action <string> Change = (str) => {
            WorkChange(message, str, textJourney);
        };

        Action Good = () => {
            WorkGood(textJourney);
        };

        Action Bed = () => {
            WorkBed(message, textJourney);
        };

        EnterTextController.Add(message, Change, Good, Bed);
    }
Exemplo n.º 5
0
        protected void SetWork(string message, string type, TextJourneyObject textJourney)
        {
            Action <string> Change = (str) =>
            {
                WorkChange(message, str, textJourney);
            };

            Action Good = () =>
            {
                WorkGood(message, textJourney);
            };

            Action Bed = () =>
            {
                WorkBed(message, textJourney);
            };

            textJourney.targetText.SetText(message.GetColor(textJourney.targetText.notSelectColor));

            EnterTextController.Add(message, Change, Good, Bed);
        }
Exemplo n.º 6
0
 public virtual void WorkChange(string message, string _text, TextJourneyObject textJourney)
 {
     textJourney.targetText.SetText(message.GetColor(_text, textJourney.targetText.selectColor, textJourney.targetText.notSelectColor));
 }
Exemplo n.º 7
0
 public virtual void WorkBed(string message, TextJourneyObject textJourney)
 {
     textJourney.targetText.SetText(message.GetColor(textJourney.targetText.notSelectColor));
 }
Exemplo n.º 8
0
 public virtual void WorkGood(string message, TextJourneyObject textJourney)
 {
     OnGood?.Invoke(message, textJourney);
 }