using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using AX.MessageSystem;
using System;
using AX.Serialization;
public enum XFSSType
{
地上消火栓,
泡沫栓,
水泵接合器,
水炮,
室内消火栓
}
public class XFSS : MonoBehaviour {
public XFSSType type;
///
/// 水炮是否开启
///
public bool IsWaterConnonOpen;
// Use this for initialization
void Start () {
MessageDispatcher.AddListener("HIDEORSHOW", HideOrShow);
}
private void OnDestroy()
{
MessageDispatcher.RemoveListener("HIDEORSHOW", HideOrShow);
}
private void HideOrShow(IMessage obj)
{
var info = (KeyValuePair) obj.Data;
if (type == info.Key)
{
if (info.Value)
{
transform.Find("Quad").gameObject.SetActive(true);
}
else
{
transform.Find("Quad").gameObject.SetActive(false);
}
}
}
// Update is called once per frame
void Update () {
}
}