using System.Collections; using System.Collections.Generic; using UnityEngine; public class XianSuoManager : MonoBehaviour { public GameObject xiansuo1; public GameObject xiansuo2; public TaskManager tm; private void OnEnable() { if (PlayerPrefs.GetInt("isend") != 1) { for (int i = 0; i <= tm.nowTaskCt; i++) { int cts = tm.nowTaskIndex; if(tm.nowTaskCt>i) { cts = tm.tconfigs[i].items.Length; } for (int j = 0; j < cts; j++) { Debug.Log(j+"_"+i + "_线索——" + tm.tconfigs[i].items[j].xiansuos.Length); if (tm.tconfigs[i].items[j].xiansuos != null) { if(!xiansuo1.activeSelf) xiansuo1.SetActive(tm.tconfigs[i].items[j].xiansuos.Length > 0); if (!xiansuo2.activeSelf) xiansuo2.SetActive(tm.tconfigs[i].items[j].xiansuos.Length > 1); } } } } else { xiansuo1.SetActive(true); xiansuo2.SetActive(true); } } }