You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
812 B
41 lines
812 B
3 years ago
|
using AX.MessageSystem;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class MobileUIActiveCtrl : MonoBehaviour {
|
||
|
|
||
|
// Use this for initialization
|
||
|
void Start ()
|
||
|
{
|
||
|
//UIActive();
|
||
|
|
||
|
MessageDispatcher.AddListener("UI_ACTIVE", UIActive);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 控制UI显隐
|
||
|
/// </summary>
|
||
|
private void UIActive(IMessage obj)
|
||
|
{
|
||
|
if (ModeHelper.Mode == Mode.None)
|
||
|
{
|
||
|
gameObject.SetActive(false);
|
||
|
}
|
||
|
if (ModeHelper.Mode == Mode.MobileCommunication)
|
||
|
{
|
||
|
gameObject.SetActive(true);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private void OnDestroy()
|
||
|
{
|
||
|
MessageDispatcher.RemoveListener("UI_ACTIVE", UIActive);
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update () {
|
||
|
|
||
|
}
|
||
|
}
|