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.
|
|
|
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;
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 水炮是否开启
|
|
|
|
/// </summary>
|
|
|
|
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<XFSSType, bool>) 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 () {
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|