using rtc; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class LimistMsg : MonoBehaviour { //未激活 public GameObject[] NoActivitys; public GameObject[] Activitys; //已激活 public GameObject[] NoActivitys1; public GameObject[] Activitys1; public Text text1; public Text text2; public void Init() { if (UserInfo.isSN) { Heid(NoActivitys); Show(Activitys); Show(NoActivitys1); Heid(Activitys1); ShowGreen(text1); ShowWhite(text2); } else if (UserInfo.activateType == 1) { Heid(NoActivitys); Show(Activitys); Show(NoActivitys1); Heid(Activitys1); ShowGreen(text1); ShowWhite(text2); } else { Show(NoActivitys); Heid(Activitys); Heid(NoActivitys1); Show(Activitys1); ShowGreen(text2); ShowWhite(text1); } } public void ShowWhite(Text text) { text.color = Color.white; } public void ShowGreen(Text text) { text.color = Color.green; } public void Show(GameObject[] games) { for (int i = 0; i < games.Length; i++) { games[i].SetActive(true); } } public void Heid(GameObject[] games) { for (int i = 0; i < games.Length; i++) { games[i].SetActive(false); } } }