网上演练贵港万达广场(人员密集)
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.
 
 
 

55 lines
1.1 KiB

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 () {
}
}