123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- 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);
- }
- }
- }
|