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