using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class MainLeftCaiDanItem : MonoBehaviour { public List hideGame = new List(); public GameObject window; public GameObject xia; public GameObject shang; public static string chooseindex; private void Start() { for (int i = 0; i < hideGame.Count; i++) { hideGame[i].SetActive(false); } } public void Choose(bool b) { if (b) { StartCoroutine(chooseyanchi(b)); this.GetComponent().color = MainLeftManager.Instance.cchoose; } else { this.GetComponent().color = MainLeftManager.Instance.cnom; } } IEnumerator chooseyanchi(bool b) { yield return null; for (int i = 0; i < hideGame.Count; i++) { hideGame[i].SetActive(b); } if (xia) { xia.SetActive(!b); shang.SetActive(b); } MainCenterManager.Instance.show(); window.SetActive(true); } public void shangxia(bool isxia) { StartCoroutine(chooseyanchi(isxia)); } }