海淀天下城电子沙盘单机版
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.
 
 
 
 

33 lines
695 B

using AX.MessageSystem;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HideUIWhileClear : MonoBehaviour
{
// Use this for initialization
void Start()
{
MessageDispatcher.AddListener("ClearObject", HideUI);
}
private void HideUI(IMessage obj)
{
if (GetComponent<MultiSelectNAV>())
{
GetComponent<MultiSelectNAV>().Clear();
return;
}
if (gameObject.activeInHierarchy)
{
gameObject.SetActive(false);
}
}
private void OnDestroy()
{
MessageDispatcher.RemoveListener("ClearObject", HideUI);
}
}