53 lines
1.2 KiB
C#
53 lines
1.2 KiB
C#
|
|
using System.Collections;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using UnityEngine;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// ϴθ<CFB4><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵ<EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
public class PipeSensor : Sensor
|
|||
|
|
{
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>θ<EFBFBD><CEB8><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
[HideInInspector]
|
|||
|
|
public bool isJieWei;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><><EFBFBD>۹<EFBFBD><DBB9>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
[HideInInspector]
|
|||
|
|
public bool isPaiWu;
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// <20><>Һ<EFBFBD><D2BA><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
/// </summary>
|
|||
|
|
[HideInInspector]
|
|||
|
|
public bool isJinYe;
|
|||
|
|
public override void ReceiveData(string datas)
|
|||
|
|
{
|
|||
|
|
base.ReceiveData(datas);
|
|||
|
|
//if (!datas.Split(',')[0].Split(':')[1].Equals(" XWJ")) return;
|
|||
|
|
if (datas.Contains("Channl"))
|
|||
|
|
{
|
|||
|
|
if (datas.Split(',')[8].Split(':')[1].Equals("1"))
|
|||
|
|
{
|
|||
|
|
isPaiWu = true;
|
|||
|
|
}
|
|||
|
|
else if (datas.Split(',')[8].Split(':')[1].Equals("2"))
|
|||
|
|
{
|
|||
|
|
isJieWei = true;
|
|||
|
|
}
|
|||
|
|
else if (datas.Split(',')[8].Split(':')[1].Equals("3"))
|
|||
|
|
{
|
|||
|
|
isJinYe = true;
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public override void Display(string datas)
|
|||
|
|
{
|
|||
|
|
base.Display(datas);
|
|||
|
|
}
|
|||
|
|
}
|