|
@@ -32,7 +32,8 @@ public class QXZData
|
|
|
[System.Serializable]
|
|
|
public class ServerObsDatas
|
|
|
{
|
|
|
- public class ServerObsData{
|
|
|
+ public class ServerObsData
|
|
|
+ {
|
|
|
public string channelId;
|
|
|
public string deviceId;
|
|
|
public string name;
|
|
@@ -142,7 +143,7 @@ public class SWZData
|
|
|
public class GCJKLayer : YZTRootLayer
|
|
|
{
|
|
|
public static GCJKLayer _Instance;
|
|
|
-
|
|
|
+
|
|
|
|
|
|
//泵站监控面板
|
|
|
private RectTransform _bengZhanJianKongPanel;
|
|
@@ -179,13 +180,13 @@ public class GCJKLayer : YZTRootLayer
|
|
|
//工程列表
|
|
|
private RectTransform _gongChengLieBiaoContent;
|
|
|
public GameObject GongChengLieBiaoItemOri;
|
|
|
- private List<GongChengLieBiaoItem> currentGongChengLieBiaoItems =new List<GongChengLieBiaoItem>();
|
|
|
+ private List<GongChengLieBiaoItem> currentGongChengLieBiaoItems = new List<GongChengLieBiaoItem>();
|
|
|
private Button GClist_QuanBuButton;
|
|
|
private Button GClist_ShuiWeiButton;
|
|
|
private Button GClist_ShuiYaButton;
|
|
|
private Button GClist_WeiYiButton;
|
|
|
private Button GClist_ShiPinButton;
|
|
|
-
|
|
|
+
|
|
|
//视频监控
|
|
|
[Header("监控数据")] public ObsPlayerPanel obsPanel;
|
|
|
public GameObject obsItemPrefab;
|
|
@@ -264,6 +265,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
{
|
|
|
StaticLod.instance.OnFoucusStatic(0);
|
|
|
|
|
|
+ bool waitInitZhaZhanJianKongData = false;
|
|
|
if (GlobalData.buYuanSensorData != null)
|
|
|
{
|
|
|
if (GlobalData.buYuanSensorData.data.Count < 1)
|
|
@@ -273,32 +275,51 @@ public class GCJKLayer : YZTRootLayer
|
|
|
|
|
|
if (GlobalData.buYuanSensorData.data.Count > 0)
|
|
|
{
|
|
|
- SetZhaZhanJianKongData();
|
|
|
+ waitInitZhaZhanJianKongData = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (GlobalData.taoKouSensorData != null)
|
|
|
+ {
|
|
|
+ if (GlobalData.taoKouSensorData.data.Count < 1)
|
|
|
+ {
|
|
|
+ await HttpHelper._Instance.SendTaoKou_GetSensorData();
|
|
|
}
|
|
|
+
|
|
|
+ if (GlobalData.taoKouSensorData.data.Count > 0)
|
|
|
+ {
|
|
|
+ waitInitZhaZhanJianKongData = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if (waitInitZhaZhanJianKongData)
|
|
|
+ {
|
|
|
+ SetZhaZhanJianKongData();
|
|
|
}
|
|
|
-
|
|
|
- if(GlobalData.BuYuanShuiWeiDataList.Count < 1)
|
|
|
+
|
|
|
+ if (GlobalData.BuYuanShuiWeiDataList.Count < 1)
|
|
|
{
|
|
|
- await HttpHelper._Instance.InitSWYJData();
|
|
|
+ await HttpHelper._Instance.InitSWYJData();
|
|
|
}
|
|
|
+
|
|
|
if (!creatShuiWeiIcon && GlobalData.BuYuanShuiWeiDataList.Count > 0)
|
|
|
{
|
|
|
CreatShuiWeiIcon();
|
|
|
FindShuiWeiTargetObje();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
if (GlobalData.BuYuanShuiWeiDataList.Count < 1)
|
|
|
{
|
|
|
await HttpHelper._Instance.GetBuYuanDevicesGroupInfo();
|
|
|
}
|
|
|
-
|
|
|
- if (!creatShuiYaIcon&&GlobalData.BuYuanShuiWeiDataList.Count>0)
|
|
|
+
|
|
|
+ if (!creatShuiYaIcon && GlobalData.BuYuanShuiWeiDataList.Count > 0)
|
|
|
{
|
|
|
CreatShuiYaIcon();
|
|
|
FindShuiYaTargetObje();
|
|
|
}
|
|
|
|
|
|
- if (!creatWeiYiIcon&& GlobalData.BuYuanWeiYiDataList.Count>0)
|
|
|
+ if (!creatWeiYiIcon && GlobalData.BuYuanWeiYiDataList.Count > 0)
|
|
|
{
|
|
|
CreatWeiYiIcon();
|
|
|
FindWeiYiTargetObje();
|
|
@@ -309,11 +330,11 @@ public class GCJKLayer : YZTRootLayer
|
|
|
SetShuiYaIconActive(shuiYaToggle.isOn);
|
|
|
SetWeiYiIconActive(weiYiToggle.isOn);
|
|
|
|
|
|
-
|
|
|
+
|
|
|
SetGongChengLieBiaoData();
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
public void Init()
|
|
|
{
|
|
|
//泵站监控面板
|
|
@@ -381,30 +402,15 @@ public class GCJKLayer : YZTRootLayer
|
|
|
_gongChengLieBiaoContent = this.transform.Find("RightUp/GongChengLieBiao/ScrollView/Viewport/Content")
|
|
|
.GetComponent<RectTransform>();
|
|
|
GClist_QuanBuButton = this.transform.Find("RightUp/GongChengLieBiao/QuanBuButton").GetComponent<Button>();
|
|
|
- GClist_QuanBuButton.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- SeachGongChengList(GongChengType.all);
|
|
|
- });
|
|
|
+ GClist_QuanBuButton.onClick.AddListener(() => { SeachGongChengList(GongChengType.all); });
|
|
|
GClist_ShuiWeiButton = this.transform.Find("RightUp/GongChengLieBiao/ShuiWeiButton").GetComponent<Button>();
|
|
|
- GClist_ShuiWeiButton.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- SeachGongChengList(GongChengType.shuiWei);
|
|
|
- });
|
|
|
+ GClist_ShuiWeiButton.onClick.AddListener(() => { SeachGongChengList(GongChengType.shuiWei); });
|
|
|
GClist_ShuiYaButton = this.transform.Find("RightUp/GongChengLieBiao/ShuiYaButton").GetComponent<Button>();
|
|
|
- GClist_ShuiYaButton.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- SeachGongChengList(GongChengType.shuiYa);
|
|
|
- });
|
|
|
+ GClist_ShuiYaButton.onClick.AddListener(() => { SeachGongChengList(GongChengType.shuiYa); });
|
|
|
GClist_WeiYiButton = this.transform.Find("RightUp/GongChengLieBiao/WeiYiButton").GetComponent<Button>();
|
|
|
- GClist_WeiYiButton.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- SeachGongChengList(GongChengType.weiYi);
|
|
|
- });
|
|
|
+ GClist_WeiYiButton.onClick.AddListener(() => { SeachGongChengList(GongChengType.weiYi); });
|
|
|
GClist_ShiPinButton = this.transform.Find("RightUp/GongChengLieBiao/JianKongButton").GetComponent<Button>();
|
|
|
- GClist_ShiPinButton.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- SeachGongChengList(GongChengType.shiPin);
|
|
|
- });
|
|
|
+ GClist_ShiPinButton.onClick.AddListener(() => { SeachGongChengList(GongChengType.shiPin); });
|
|
|
|
|
|
//监控
|
|
|
obsPanel = this.transform.Find("Main/ObsPlayerPanel").GetComponent<ObsPlayerPanel>();
|
|
@@ -466,15 +472,14 @@ public class GCJKLayer : YZTRootLayer
|
|
|
|
|
|
dropToggle.onValueChanged.AddListener((active) =>
|
|
|
{
|
|
|
-
|
|
|
- for (int i = 0; i < dropUnits.Count; i++) {
|
|
|
+ for (int i = 0; i < dropUnits.Count; i++)
|
|
|
+ {
|
|
|
dropUnits[i].gameObject.SetActive(active);
|
|
|
}
|
|
|
});
|
|
|
|
|
|
weatherToggle.onValueChanged.AddListener((active) =>
|
|
|
{
|
|
|
-
|
|
|
for (int i = 0; i < weatherUnits.Count; i++)
|
|
|
{
|
|
|
weatherUnits[i].gameObject.SetActive(active);
|
|
@@ -482,7 +487,8 @@ public class GCJKLayer : YZTRootLayer
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- public async void OnGlobalWeatherClick() {
|
|
|
+ public async void OnGlobalWeatherClick()
|
|
|
+ {
|
|
|
if (GlobalData.qXZDatas.Count < 1 || GlobalData.sWZDatas.Count < 1)
|
|
|
await HttpHelper._Instance.InitGCJKData();
|
|
|
|
|
@@ -498,14 +504,16 @@ public class GCJKLayer : YZTRootLayer
|
|
|
GameObject gameObject = Instantiate(dropUnitPrefab);
|
|
|
DropUnit dropUnit = gameObject.GetComponent<DropUnit>();
|
|
|
dropUnit.transform.SetParent(miniMapQXContent.transform);
|
|
|
- dropUnit.Init(GlobalData.qXZDatas[i].LGTD, GlobalData.qXZDatas[i].LTTD, GlobalData.qXZDatas[i].STNM, GlobalData.qXZDatas[i].dropSum6.ToString());
|
|
|
+ dropUnit.Init(GlobalData.qXZDatas[i].LGTD, GlobalData.qXZDatas[i].LTTD, GlobalData.qXZDatas[i].STNM,
|
|
|
+ GlobalData.qXZDatas[i].dropSum6.ToString());
|
|
|
dropUnits.Add(dropUnit);
|
|
|
|
|
|
dropUnit.bingObj = Instantiate(runtimePointObj).gameObject;
|
|
|
dropUnit.bingObj.transform.SetParent(shaPan.transform.GetChild(9));
|
|
|
dropUnit.bingObj.transform.localEulerAngles = Vector3.zero;
|
|
|
dropUnit.bingObj.transform.localScale = Vector3.one;
|
|
|
- dropUnit.bingObj.transform.localPosition = CoordinateConverter.GeoToUGUISmall(GlobalData.qXZDatas[i].LGTD, GlobalData.qXZDatas[i].LTTD);
|
|
|
+ dropUnit.bingObj.transform.localPosition =
|
|
|
+ CoordinateConverter.GeoToUGUISmall(GlobalData.qXZDatas[i].LGTD, GlobalData.qXZDatas[i].LTTD);
|
|
|
dropUnit.bingObj.name = GlobalData.qXZDatas[i].STNM;
|
|
|
}
|
|
|
|
|
@@ -514,14 +522,16 @@ public class GCJKLayer : YZTRootLayer
|
|
|
GameObject gameObject = Instantiate(dropUnitPrefab);
|
|
|
DropUnit dropUnit = gameObject.GetComponent<DropUnit>();
|
|
|
dropUnit.transform.SetParent(miniMapSWContent.transform);
|
|
|
- dropUnit.Init(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD, GlobalData.sWZDatas[i].STNM, GlobalData.sWZDatas[i].dropSum6.ToString());
|
|
|
+ dropUnit.Init(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD, GlobalData.sWZDatas[i].STNM,
|
|
|
+ GlobalData.sWZDatas[i].dropSum6.ToString());
|
|
|
dropUnits.Add(dropUnit);
|
|
|
|
|
|
dropUnit.bingObj = Instantiate(runtimePointObj).gameObject;
|
|
|
dropUnit.bingObj.transform.SetParent(shaPan.transform.GetChild(10));
|
|
|
dropUnit.bingObj.transform.localEulerAngles = Vector3.zero;
|
|
|
dropUnit.bingObj.transform.localScale = Vector3.one;
|
|
|
- dropUnit.bingObj.transform.localPosition = CoordinateConverter.GeoToUGUISmall(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD);
|
|
|
+ dropUnit.bingObj.transform.localPosition =
|
|
|
+ CoordinateConverter.GeoToUGUISmall(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD);
|
|
|
dropUnit.bingObj.name = GlobalData.sWZDatas[i].STNM;
|
|
|
}
|
|
|
}
|
|
@@ -531,14 +541,18 @@ public class GCJKLayer : YZTRootLayer
|
|
|
int index = 0;
|
|
|
for (int i = 0; i < GlobalData.qXZDatas.Count; i++)
|
|
|
{
|
|
|
- dropUnits[i].Init(GlobalData.qXZDatas[i].LGTD, GlobalData.qXZDatas[i].LTTD, GlobalData.qXZDatas[i].STNM, GlobalData.qXZDatas[i].dropSum6.ToString());
|
|
|
+ dropUnits[i].Init(GlobalData.qXZDatas[i].LGTD, GlobalData.qXZDatas[i].LTTD, GlobalData.qXZDatas[i].STNM,
|
|
|
+ GlobalData.qXZDatas[i].dropSum6.ToString());
|
|
|
index++;
|
|
|
}
|
|
|
+
|
|
|
for (int i = 0; i < GlobalData.sWZDatas.Count; i++)
|
|
|
{
|
|
|
- dropUnits[i + index].Init(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD, GlobalData.sWZDatas[i].STNM, GlobalData.sWZDatas[i].dropSum6.ToString());
|
|
|
+ dropUnits[i + index].Init(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD,
|
|
|
+ GlobalData.sWZDatas[i].STNM, GlobalData.sWZDatas[i].dropSum6.ToString());
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if (weatherUnits.Count <= 0)
|
|
|
{
|
|
|
for (int i = 0; i < GlobalData.sWZDatas.Count; i++)
|
|
@@ -546,14 +560,16 @@ public class GCJKLayer : YZTRootLayer
|
|
|
GameObject gameObject = Instantiate(weatherUnitPrefab);
|
|
|
WeatherUnit weatherUnit = gameObject.GetComponent<WeatherUnit>();
|
|
|
weatherUnit.transform.SetParent(miniMapSWContent.transform);
|
|
|
- weatherUnit.Init(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD, GlobalData.sWZDatas[i].STNM, GlobalData.sWZDatas[i].wth);
|
|
|
+ weatherUnit.Init(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD, GlobalData.sWZDatas[i].STNM,
|
|
|
+ GlobalData.sWZDatas[i].wth);
|
|
|
weatherUnits.Add(weatherUnit);
|
|
|
|
|
|
weatherUnit.bingObj = Instantiate(runtimePointObj).gameObject;
|
|
|
weatherUnit.bingObj.transform.SetParent(shaPan.transform.GetChild(10));
|
|
|
weatherUnit.bingObj.transform.localEulerAngles = Vector3.zero;
|
|
|
weatherUnit.bingObj.transform.localScale = Vector3.one;
|
|
|
- weatherUnit.bingObj.transform.localPosition = CoordinateConverter.GeoToUGUISmall(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD);
|
|
|
+ weatherUnit.bingObj.transform.localPosition =
|
|
|
+ CoordinateConverter.GeoToUGUISmall(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD);
|
|
|
weatherUnit.bingObj.name = GlobalData.sWZDatas[i].STNM;
|
|
|
}
|
|
|
}
|
|
@@ -561,7 +577,8 @@ public class GCJKLayer : YZTRootLayer
|
|
|
{
|
|
|
for (int i = 0; i < GlobalData.sWZDatas.Count; i++)
|
|
|
{
|
|
|
- weatherUnits[i].Init(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD, GlobalData.sWZDatas[i].STNM, GlobalData.sWZDatas[i].wth);
|
|
|
+ weatherUnits[i].Init(GlobalData.sWZDatas[i].LGTD, GlobalData.sWZDatas[i].LTTD,
|
|
|
+ GlobalData.sWZDatas[i].STNM, GlobalData.sWZDatas[i].wth);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -593,28 +610,40 @@ public class GCJKLayer : YZTRootLayer
|
|
|
|
|
|
public void SetZhaZhanJianKongData()
|
|
|
{
|
|
|
- ZhaZhanJianKongData[] datas = new ZhaZhanJianKongData[GlobalData.buYuanSensorData.data.Count];
|
|
|
- for (int i = 0; i < datas.Length; i++)
|
|
|
+ List<ZhaZhanJianKongData> datas = new List<ZhaZhanJianKongData>();
|
|
|
+ for (int i = 0; i < GlobalData.buYuanSensorData.data.Count; i++)
|
|
|
{
|
|
|
- datas[i] = new ZhaZhanJianKongData()
|
|
|
+ datas.Add(new ZhaZhanJianKongData()
|
|
|
{
|
|
|
name = "闸门_" + GlobalData.buYuanSensorData.data[i].sensor_id,
|
|
|
openValue = GlobalData.buYuanSensorData.data[i].gate_open ? 1 : 0,
|
|
|
state = GlobalData.buYuanSensorData.data[i].gate_open
|
|
|
? ZhaZhanState.open
|
|
|
: ZhaZhanState.close,
|
|
|
- //DevicesData._Instance.buYuanSensorData
|
|
|
- };
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ for (int i = 0; i < GlobalData.taoKouSensorData.data.Count; i++)
|
|
|
+ {
|
|
|
+ datas.Add(new ZhaZhanJianKongData()
|
|
|
+ {
|
|
|
+ name = "闸门_" + GlobalData.taoKouSensorData.data[i].sensor_id,
|
|
|
+ openValue = GlobalData.taoKouSensorData.data[i].gate_open ? 1 : 0,
|
|
|
+ state = GlobalData.taoKouSensorData.data[i].gate_open
|
|
|
+ ? ZhaZhanState.open
|
|
|
+ : ZhaZhanState.close,
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
for (int i = 0; i < currentZhaZhanJianKongItems.Count; i++)
|
|
|
{
|
|
|
Destroy(currentZhaZhanJianKongItems[i].gameObject);
|
|
|
}
|
|
|
+
|
|
|
currentZhaZhanJianKongItems.Clear();
|
|
|
- if (datas != null && datas.Length > 0)
|
|
|
+ if (datas != null && datas.Count > 0)
|
|
|
{
|
|
|
- for (int i = 0; i < datas.Length; i++)
|
|
|
+ for (int i = 0; i < datas.Count; i++)
|
|
|
{
|
|
|
ZhaZhanJianKongItem tempItem = Instantiate(ZhaZhanJianKongItemOri, _zhaZhanJianKongContent)
|
|
|
.GetComponent<ZhaZhanJianKongItem>();
|
|
@@ -654,7 +683,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
|
|
|
public void SetGongChengLieBiaoData()
|
|
|
{
|
|
|
- List<GongChengLieBiaoData> datas =new List<GongChengLieBiaoData>();
|
|
|
+ List<GongChengLieBiaoData> datas = new List<GongChengLieBiaoData>();
|
|
|
//水位
|
|
|
foreach (var tempData in GlobalData.BuYuanShuiWeiDataList)
|
|
|
{
|
|
@@ -664,6 +693,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
tempLieBiaoData.state = GongChengState.normal;
|
|
|
datas.Add(tempLieBiaoData);
|
|
|
}
|
|
|
+
|
|
|
//水压
|
|
|
foreach (var tempData in GlobalData.BuYuanShuiYaDataList)
|
|
|
{
|
|
@@ -673,6 +703,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
tempLieBiaoData.state = GongChengState.normal;
|
|
|
datas.Add(tempLieBiaoData);
|
|
|
}
|
|
|
+
|
|
|
//位移
|
|
|
foreach (var tempData in GlobalData.BuYuanWeiYiDataList)
|
|
|
{
|
|
@@ -682,6 +713,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
tempLieBiaoData.state = GongChengState.normal;
|
|
|
datas.Add(tempLieBiaoData);
|
|
|
}
|
|
|
+
|
|
|
//监控
|
|
|
foreach (var tempData in GlobalData.obsDatas)
|
|
|
{
|
|
@@ -691,42 +723,46 @@ public class GCJKLayer : YZTRootLayer
|
|
|
tempLieBiaoData.state = tempData.status ? GongChengState.normal : GongChengState.warning;
|
|
|
datas.Add(tempLieBiaoData);
|
|
|
}
|
|
|
+
|
|
|
GClist_QuanBuButton.GetComponentInChildren<Text>().color = Color.white;
|
|
|
- GClist_ShuiWeiButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
- GClist_ShuiYaButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
- GClist_WeiYiButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
- GClist_ShiPinButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
+ GClist_ShuiWeiButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
+ GClist_ShuiYaButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
+ GClist_WeiYiButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
+ GClist_ShiPinButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
for (int i = 0; i < currentGongChengLieBiaoItems.Count; i++)
|
|
|
{
|
|
|
Destroy(currentGongChengLieBiaoItems[i].gameObject);
|
|
|
}
|
|
|
+
|
|
|
currentGongChengLieBiaoItems = new List<GongChengLieBiaoItem>();
|
|
|
for (int i = 0; i < datas.Count; i++)
|
|
|
{
|
|
|
GongChengLieBiaoItem tempItem = Instantiate(GongChengLieBiaoItemOri, _gongChengLieBiaoContent)
|
|
|
.GetComponent<GongChengLieBiaoItem>();
|
|
|
tempItem.Init();
|
|
|
- datas[i].index = i+1;
|
|
|
+ datas[i].index = i + 1;
|
|
|
tempItem.SetData(datas[i]);
|
|
|
currentGongChengLieBiaoItems.Add(tempItem);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
//筛选工程列表
|
|
|
public void SeachGongChengList(GongChengType type)
|
|
|
{
|
|
|
- GClist_QuanBuButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
- GClist_ShuiWeiButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
- GClist_ShuiYaButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
- GClist_WeiYiButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
- GClist_ShiPinButton.GetComponentInChildren<Text>().color=new Color(0.6470588f,0.7490196f,0.8862745f);
|
|
|
+ GClist_QuanBuButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
+ GClist_ShuiWeiButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
+ GClist_ShuiYaButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
+ GClist_WeiYiButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
+ GClist_ShiPinButton.GetComponentInChildren<Text>().color = new Color(0.6470588f, 0.7490196f, 0.8862745f);
|
|
|
switch (type)
|
|
|
{
|
|
|
- case GongChengType.all:
|
|
|
+ case GongChengType.all:
|
|
|
GClist_QuanBuButton.GetComponentInChildren<Text>().color = Color.white;
|
|
|
foreach (var obj in currentGongChengLieBiaoItems)
|
|
|
{
|
|
|
obj.gameObject.SetActive(true);
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
case GongChengType.shuiWei:
|
|
|
GClist_ShuiWeiButton.GetComponentInChildren<Text>().color = Color.white;
|
|
@@ -734,6 +770,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
{
|
|
|
obj.gameObject.SetActive(obj._currentData.type == GongChengType.shuiWei);
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
case GongChengType.shuiYa:
|
|
|
GClist_ShuiYaButton.GetComponentInChildren<Text>().color = Color.white;
|
|
@@ -741,6 +778,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
{
|
|
|
obj.gameObject.SetActive(obj._currentData.type == GongChengType.shuiYa);
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
case GongChengType.weiYi:
|
|
|
GClist_WeiYiButton.GetComponentInChildren<Text>().color = Color.white;
|
|
@@ -748,6 +786,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
{
|
|
|
obj.gameObject.SetActive(obj._currentData.type == GongChengType.weiYi);
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
case GongChengType.shiPin:
|
|
|
GClist_ShiPinButton.GetComponentInChildren<Text>().color = Color.white;
|
|
@@ -755,6 +794,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
{
|
|
|
obj.gameObject.SetActive(obj._currentData.type == GongChengType.shiPin);
|
|
|
}
|
|
|
+
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
@@ -762,11 +802,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
//监控列表
|
|
|
public async Task CreatObsItem()
|
|
|
{
|
|
|
- await new WaitUntil(() =>
|
|
|
- {
|
|
|
- return GlobalData.obsDatas.Count > 0;
|
|
|
-
|
|
|
- });
|
|
|
+ await new WaitUntil(() => { return GlobalData.obsDatas.Count > 0; });
|
|
|
_obsItems = new List<ObsItem>();
|
|
|
_obsIconCtrls = new List<ObsIconCtrl>();
|
|
|
for (int i = 0; i < GlobalData.obsDatas.Count; i++)
|
|
@@ -779,6 +815,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
_obsIconCtrls.Add(tempIcon);
|
|
|
//Debug.Log(StaticLod.instance.GetStaticObj(GlobalData.obsDatas[i].name).gameObject.name);
|
|
|
}
|
|
|
+
|
|
|
SetObsIconActive(obsToggle.isOn);
|
|
|
}
|
|
|
|
|
@@ -859,6 +896,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
for (int i = 0; i < _obsIconCtrls.Count; i++)
|
|
|
{
|
|
|
_obsIconCtrls[i].gameObject.SetActive(show);
|
|
@@ -979,6 +1017,7 @@ public class GCJKLayer : YZTRootLayer
|
|
|
tempIcon.Init(GlobalData.BuYuanWeiYiDataList[i]);
|
|
|
_weiYiIconCtrls.Add(tempIcon);
|
|
|
}
|
|
|
+
|
|
|
creatWeiYiIcon = true;
|
|
|
}
|
|
|
|