123456789101112131415161718192021222324252627282930313233343536373839 |
- 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++)
- {
- for (int j = 0; j < tm.nowTaskIndex; j++)
- {
- if (tm.tconfigs[i].TaskList[j].xiansuos != null)
- {
- Debug.Log("线索——"+ tm.tconfigs[i].TaskList[j].xiansuos.Count);
- if(!xiansuo1.activeSelf)
- xiansuo1.SetActive(tm.tconfigs[i].TaskList[j].xiansuos.Count > 0);
- if (!xiansuo2.activeSelf)
- xiansuo2.SetActive(tm.tconfigs[i].TaskList[j].xiansuos.Count > 1);
- }
- }
- }
- }
- else
- {
- xiansuo1.SetActive(true);
- xiansuo2.SetActive(true);
- }
- }
- }
|