1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- public class MainLeftManager : MonoBehaviour
- {
- public static MainLeftManager Instance;
- public Color cnom;
- public Color cchoose;
- // public List<GameObject> list;
- private void Awake()
- {
- Instance = this;
- }
- IEnumerator Start()
- {
- yield return new WaitForSeconds(1f);
- /*
- list = new List<GameObject>();
- int ct = this.transform.childCount;
- for (int i = 0; i < ct; i++)
- {
- list.Add(this.transform.GetChild(i).gameObject);
- list[i].GetComponent<RawImage>().color = cnom;
- }
- list[0].GetComponent<RawImage>().color = cchoose;
- list[0].GetComponent<MainLeftCaiDanItem>().Choose(true);*/
- }
- public void choose(string index)
- {
- }
- public List<GameObject> list;
- private void OnEnable() {
-
- if(DataManager.admin==1)
- {
- for (int i = 0;i<list.Count;i++)
- {
- list[i].SetActive(true);
- }
- }
- else
- {
- for (int i = 0;i<list.Count;i++)
- {
- list[i].SetActive(false);
- }
- }
- }
- }
|