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.
30 lines
992 B
30 lines
992 B
using AX.MessageSystem; |
|
using System.Collections; |
|
using System.Collections.Generic; |
|
using UnityEngine; |
|
/// <summary> |
|
/// 供水报告面板 |
|
/// </summary> |
|
public class WaterSupplyPanel : MonoBehaviour { |
|
public ButtonRecordByAC CloseButton; |
|
// Use this for initialization |
|
void Start () { |
|
MessageDispatcher.AddListener(FireInfoMessage.WaterSupplyReport.ToString(), OpenPanel); |
|
CloseButton = transform.Find("HeadTitleBG/CloseButton").GetComponent<ButtonRecordByAC>(); |
|
CloseButton.OutInterFaceButton = closeClick; |
|
gameObject.SetActive(false); |
|
} |
|
private void OnDestroy() |
|
{ |
|
MessageDispatcher.RemoveListener(FireInfoMessage.WaterSupplyReport.ToString(), OpenPanel); |
|
} |
|
void OpenPanel(IMessage obj) |
|
{ |
|
var value = (bool)obj.Data; |
|
gameObject.SetActive(value); |
|
} |
|
private void closeClick() |
|
{ |
|
MessageDispatcher.SendMessage("CloseFireInfoPanel", (int)FireInfoMessage.WaterSupplyReport); |
|
} |
|
}
|
|
|