| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.UI;
- //遮罩-认证登录时用到
- public class AuthLoginMask : MonoBehaviour
- {
- public static AuthLoginMask ins;
- void Awake()
- {
- ins = this;
- SetVisiable(false);
- }
- void OnDestroy()
- {
- if (ins == this) ins = null;
- }
- public bool IsVisiable() {
- return gameObject.activeSelf;
- }
- public void SetVisiable(bool visiable) {
- gameObject.SetActive(visiable);
- if (visiable) {
- GetComponentInChildren<Text>().text =
- TextAutoLanguage2.GetTextByKey("home_loginAuth");
- }
- }
- public void SetRetryCount(int count) {
- if (gameObject.activeSelf) {
- GetComponentInChildren<Text>().text =
- string.Format(TextAutoLanguage2.GetTextByKey("home_loginAuthRetry"), count);
- }
- }
- public void SetText(string text) {
- GetComponentInChildren<Text>().text = text;
- }
- }
|