12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class MainLeftCaiDanItem : MonoBehaviour
- {
- public List<GameObject> hideGame = new List<GameObject>();
- 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<RawImage>().color = MainLeftManager.Instance.cchoose;
- }
- else
- {
- this.GetComponent<RawImage>().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));
- }
- }
|