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); } } }
public virtual void WorkGood(TextJourneyObject textJourney) { EnterTextController.RemoveAll(); if (textJourney.effect != null) { textJourney.effect.Show(); } ClearUI(); }
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); } }
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); }
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); }
public virtual void WorkChange(string message, string _text, TextJourneyObject textJourney) { textJourney.targetText.SetText(message.GetColor(_text, textJourney.targetText.selectColor, textJourney.targetText.notSelectColor)); }
public virtual void WorkBed(string message, TextJourneyObject textJourney) { textJourney.targetText.SetText(message.GetColor(textJourney.targetText.notSelectColor)); }
public virtual void WorkGood(string message, TextJourneyObject textJourney) { OnGood?.Invoke(message, textJourney); }