12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class TextLogCheck : MonoBehaviour
- {
- public GameObject center;
- public TaskManager tm;
- private void OnDisable()
- {
- center.SetActive(true);
- }
- private void OnEnable()
- {
- center.SetActive(false);
- Text t = this.GetComponent<Text>();
- for (int i = 0; i < tm.tconfigs.Count; i++)
- {
- if(i<=tm.nowTaskCt)
- {
- for (int j = 0; j < tm.tconfigs[i].TaskList.Count; j++)
- {
- if (i < tm.nowTaskCt)
- {
- if(!tm.tconfigs[i].TaskList[j].isNoshow)
- {
- if (tm.iidex == 1 && tm.tconfigs[i].TaskList[j].info2 != "")
- t.text += "\n" + tm.tconfigs[i].TaskList[j].info2 + "\n";
- else
- {
- t.text += "\n" + tm.tconfigs[i].TaskList[j].info + "\n";
- }
- }
- }
- else if(j<=tm.nowTaskIndex)
- {
- if (!tm.tconfigs[i].TaskList[j].isNoshow)
- {
- if (tm.iidex == 1 && tm.tconfigs[i].TaskList[j].info2 != "")
- t.text += "\n" + tm.tconfigs[i].TaskList[j].info2 + "\n";
- else
- {
- t.text += "\n" + tm.tconfigs[i].TaskList[j].info + "\n";
- }
- }
- }
- }
- }
- }
-
- }
- }
|