|
@@ -21,7 +21,7 @@ public class FloodGate
|
|
|
//public float CurrentFlow;
|
|
|
[FormerlySerializedAs("CurrentOpening")] public float opening_degree;
|
|
|
public bool gate_breakdown;
|
|
|
- public string updateTime=>GetTime();
|
|
|
+ public string updateTime => GetTime();
|
|
|
public long record_ts;
|
|
|
public string station_name;
|
|
|
|
|
@@ -70,7 +70,27 @@ public class FloodGateStatusData
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+[Serializable]
|
|
|
+public class ValueWithDescription
|
|
|
+{
|
|
|
+ public float value;
|
|
|
+ public string description;
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
+[Serializable]
|
|
|
+public class FloodStorageArea
|
|
|
+{
|
|
|
+ public ValueWithDescription area;
|
|
|
+ public ValueWithDescription leveeLength;
|
|
|
+ public ValueWithDescription storageCapacity;
|
|
|
+ public ValueWithDescription designWaterLevel;
|
|
|
+ public ValueWithDescription operationStandard;
|
|
|
+ public ValueWithDescription safetyZones;
|
|
|
+ public ValueWithDescription gateStations;
|
|
|
+ public ValueWithDescription pumpStations;
|
|
|
+ public ValueWithDescription drainageStations;
|
|
|
+}
|
|
|
|
|
|
|
|
|
[System.Serializable]
|
|
@@ -141,6 +161,7 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
{
|
|
|
public VerticalLayoutGroup content;
|
|
|
|
|
|
+ public Text[] floodStorageAreaData;
|
|
|
|
|
|
public RectTransform znz;
|
|
|
|
|
@@ -230,6 +251,8 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
_obsSearchInputField = this.transform.Find("BigSc/ShiPinJuZhen/InputField").GetComponent<InputField>();
|
|
|
_obsSearchInputField.onValueChanged.AddListener(SearchObsItem);
|
|
|
|
|
|
+ InitFloodAreaData();
|
|
|
+
|
|
|
InitFloodGateData();
|
|
|
|
|
|
InitHydrologicalData();
|
|
@@ -438,7 +461,7 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
{
|
|
|
await new WaitUntil(() =>
|
|
|
{
|
|
|
- return GlobalData.locationWeatherData.Count > 0;
|
|
|
+ return GlobalData.swDatas.Count > 0 && GlobalData.qXZDatas.Count > 0 && GlobalData.sWZDatas.Count > 0;
|
|
|
});
|
|
|
ChangeLocationWeatherData(0);
|
|
|
swDrop0.onValueChanged.AddListener((index) =>
|
|
@@ -449,333 +472,427 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
|
|
|
private void ChangeLocationWeatherData(int index)
|
|
|
{
|
|
|
- swValue1.text = GlobalData.locationWeatherData[index].currentWaterLevel.ToString();
|
|
|
- swValue2.text = GlobalData.locationWeatherData[index].rainfall.ToString();
|
|
|
- swValue3.text = GlobalData.locationWeatherData[index].temperature.ToString();
|
|
|
- swValue4.text = GlobalData.locationWeatherData[index].weather.ToString();
|
|
|
- swValue5.text = GlobalData.locationWeatherData[index].floodDischarge.ToString();
|
|
|
- }
|
|
|
- private async Task InitFloodGateData()
|
|
|
- {
|
|
|
- await new WaitUntil(() =>
|
|
|
- {
|
|
|
- return GlobalData.floorGateData.success;
|
|
|
- });
|
|
|
-
|
|
|
- await new WaitUntil(() =>
|
|
|
- {
|
|
|
- return GlobalData.buYuanSensorData.data.Count>0&&GlobalData.taoKouSensorData.data.Count>0;
|
|
|
- });
|
|
|
-
|
|
|
- floodTexts[0].text = (GlobalData.floorGateData.BuYuanOperationalGates + GlobalData.floorGateData.TaoKouOperationalGates).ToString();
|
|
|
- floodTexts[1].text = (GlobalData.floorGateData.BuYuanTotalGates + GlobalData.floorGateData.TaoKouTotalGates - GlobalData.floorGateData.BuYuanOperationalGates - GlobalData.floorGateData.TaoKouOperationalGates).ToString();
|
|
|
- floodTexts[2].text = (GlobalData.floorGateData.BuYuanTotalGates + GlobalData.floorGateData.TaoKouTotalGates).ToString();
|
|
|
- floodButton.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- popWindow.gameObject.SetActive(true);
|
|
|
- });
|
|
|
- floodListExitBtn.onClick.AddListener(() =>
|
|
|
- {
|
|
|
- popWindow.gameObject.SetActive(false);
|
|
|
- });
|
|
|
- floodListBtns[0].onClick.AddListener(() =>
|
|
|
- {
|
|
|
- floodListBtns[0].GetComponent<Image>().sprite = sprites[0];
|
|
|
- floodListBtns[1].GetComponent<Image>().sprite = sprites[1];
|
|
|
- floodLists[0].transform.parent.parent.parent.gameObject.SetActive(true);
|
|
|
- floodLists[1].transform.parent.parent.parent.gameObject.SetActive(false);
|
|
|
- });
|
|
|
- floodListBtns[1].onClick.AddListener(() =>
|
|
|
- {
|
|
|
- floodListBtns[0].GetComponent<Image>().sprite = sprites[1];
|
|
|
- floodListBtns[1].GetComponent<Image>().sprite = sprites[0];
|
|
|
- floodLists[0].transform.parent.parent.parent.gameObject.SetActive(false);
|
|
|
- floodLists[1].transform.parent.parent.parent.gameObject.SetActive(true);
|
|
|
- });
|
|
|
- var buyuanData = GlobalData.buYuanSensorData.data;
|
|
|
- for (int i = 0; i < buyuanData.Count; i++)
|
|
|
- {
|
|
|
- GameObject floodGateDataObj = Instantiate(floodDataPrefab);
|
|
|
- floodGateDataObj.transform.SetParent(floodLists[0].transform);
|
|
|
- floodGateDataObj.transform.localScale = Vector3.one;
|
|
|
- floodGateDataObj.transform.GetChild(1).GetComponent<Text>().text = (i + 1).ToString("00") + "号闸门";
|
|
|
- floodGateDataObj.transform.GetChild(7).GetComponent<Text>().text = buyuanData[i].gate_opening ? "开启" : "关闭";
|
|
|
- floodGateDataObj.transform.GetChild(8).GetComponent<Text>().text = "- m³/s";
|
|
|
- floodGateDataObj.transform.GetChild(9).GetComponent<Text>().text = "m";
|
|
|
- floodGateDataObj.transform.GetChild(10).GetComponent<Text>().text = buyuanData[i].opening_degree*0.01 + "m";
|
|
|
- floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = buyuanData[i].gate_breakdown ? "故障":"正常";
|
|
|
+ string swkey = "";
|
|
|
+ string qxKey = "";
|
|
|
+ string swKey = "";
|
|
|
+ if (index == 0)
|
|
|
+ {
|
|
|
+ swkey = "补元(上)";
|
|
|
+ qxKey = "新滩";
|
|
|
+ swKey = "新滩";
|
|
|
}
|
|
|
- var taokouData = GlobalData.taoKouSensorData.data;
|
|
|
- for (int i = 0; i < taokouData.Count; i++)
|
|
|
- {
|
|
|
- GameObject floodGateDataObj = Instantiate(floodDataPrefab);
|
|
|
- floodGateDataObj.transform.SetParent(floodLists[1].transform);
|
|
|
- floodGateDataObj.transform.localScale = Vector3.one;
|
|
|
- floodGateDataObj.transform.GetChild(1).GetComponent<Text>().text = (i + 1).ToString("00") + "号闸门";
|
|
|
- floodGateDataObj.transform.GetChild(7).GetComponent<Text>().text = taokouData[i].gate_opening ? "开启" : "关闭";
|
|
|
- floodGateDataObj.transform.GetChild(8).GetComponent<Text>().text = "- m³/s";
|
|
|
- floodGateDataObj.transform.GetChild(9).GetComponent<Text>().text = "m";
|
|
|
- floodGateDataObj.transform.GetChild(10).GetComponent<Text>().text = taokouData[i].opening_degree*0.01 + "m";
|
|
|
- floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = taokouData[i].gate_breakdown ? "故障":"正常";
|
|
|
+ else
|
|
|
+ {
|
|
|
+ swkey = "套口(上)";
|
|
|
+ qxKey = "大沙";
|
|
|
+ swKey = "大沙";
|
|
|
}
|
|
|
- // for (int i = 0; i < GlobalData.floorGateData.BuYuan.FloodGates.Length; i++)
|
|
|
- // {
|
|
|
- // GameObject floodGateDataObj = Instantiate(floodDataPrefab);
|
|
|
- // floodGateDataObj.transform.SetParent(floodLists[0].transform);
|
|
|
- // floodGateDataObj.transform.localScale = Vector3.one;
|
|
|
- // floodGateDataObj.transform.GetChild(1).GetComponent<Text>().text = (i + 1).ToString("00") + "号闸门";
|
|
|
- // floodGateDataObj.transform.GetChild(7).GetComponent<Text>().text = GlobalData.floorGateData.BuYuan.FloodGates[i].IsOpen ? "开启" : "关闭";
|
|
|
- // floodGateDataObj.transform.GetChild(8).GetComponent<Text>().text = GlobalData.floorGateData.BuYuan.FloodGates[i].CurrentFlow + "m³/s";
|
|
|
- // floodGateDataObj.transform.GetChild(9).GetComponent<Text>().text = GlobalData.floorGateData.BuYuan.CurrentWaterLevel + "m";
|
|
|
- // floodGateDataObj.transform.GetChild(10).GetComponent<Text>().text = GlobalData.floorGateData.BuYuan.FloodGates[i].CurrentOpening + "°";
|
|
|
- // switch (GlobalData.floorGateData.BuYuan.FloodGates[i].Status)
|
|
|
- // {
|
|
|
- // case 0:
|
|
|
- // floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = "故障";
|
|
|
- // break;
|
|
|
- // case 1:
|
|
|
- // floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = "正常";
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // for (int i = 0; i < GlobalData.floorGateData.TaoKou.FloodGates.Length; i++)
|
|
|
- // {
|
|
|
- // GameObject floodGateDataObj = Instantiate(floodDataPrefab);
|
|
|
- // floodGateDataObj.transform.SetParent(floodLists[1].transform);
|
|
|
- // floodGateDataObj.transform.localScale = Vector3.one;
|
|
|
- // floodGateDataObj.transform.GetChild(1).GetComponent<Text>().text = (i + 1).ToString("00") + "号闸门";
|
|
|
- // floodGateDataObj.transform.GetChild(7).GetComponent<Text>().text = GlobalData.floorGateData.TaoKou.FloodGates[i].IsOpen ? "开启" : "关闭";
|
|
|
- // floodGateDataObj.transform.GetChild(8).GetComponent<Text>().text = GlobalData.floorGateData.TaoKou.FloodGates[i].CurrentFlow + "m³/s";
|
|
|
- // floodGateDataObj.transform.GetChild(9).GetComponent<Text>().text = GlobalData.floorGateData.TaoKou.CurrentWaterLevel + "m";
|
|
|
- // floodGateDataObj.transform.GetChild(10).GetComponent<Text>().text = GlobalData.floorGateData.TaoKou.FloodGates[i].CurrentOpening + "°";
|
|
|
- // switch (GlobalData.floorGateData.TaoKou.FloodGates[i].Status)
|
|
|
- // {
|
|
|
- // case 0:
|
|
|
- // floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = "故障";
|
|
|
- // break;
|
|
|
- // case 1:
|
|
|
- // floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = "正常";
|
|
|
- // break;
|
|
|
- // }
|
|
|
- // }
|
|
|
- List<double> doubles = new List<double>();
|
|
|
- doubles.Add(90);
|
|
|
- doubles.Add(100);
|
|
|
- floodRingChart.UpdateData(0, 0, doubles);
|
|
|
|
|
|
+ float swH = -1.0f;
|
|
|
+ for (int i = 0; i < GlobalData.swDatas.Count; i++) {
|
|
|
+ if (GlobalData.swDatas[i].stnm == swkey) {
|
|
|
+ swH = GlobalData.swDatas[i].upz ?? 0;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- }
|
|
|
-
|
|
|
- private async Task InitInspectionStatistics()
|
|
|
- {
|
|
|
- await new WaitUntil(() =>
|
|
|
+ int qxIndex = 0;
|
|
|
+ for (int i = 0; i < GlobalData.qXZDatas.Count; i++)
|
|
|
{
|
|
|
- return GlobalData.InspectionStat.Count > 0;
|
|
|
- });
|
|
|
- currentYunIndex = 0;
|
|
|
- yunValue1.text = GlobalData.InspectionStat[0].daily.operationStaffCount.ToString();
|
|
|
- yunValue2.text = GlobalData.InspectionStat[0].daily.inspectionTasksCount.ToString();
|
|
|
- yunValue3.text = GlobalData.InspectionStat[0].daily.inspectionKilometers.ToString();
|
|
|
- yunValue4.text = GlobalData.InspectionStat[0].daily.faultHazardCount.ToString();
|
|
|
- yunValue5.text = GlobalData.InspectionStat[0].daily.processedFaultCount.ToString();
|
|
|
- yunValue6.text = GlobalData.InspectionStat[0].daily.engineeringMaintenanceCount.ToString();
|
|
|
- yunDrop0.onValueChanged.AddListener((index) =>
|
|
|
- {
|
|
|
- currentYunIndex = index;
|
|
|
- SwitchStationStat(yunDrop1.value);
|
|
|
- });
|
|
|
- yunDrop1.onValueChanged.AddListener((index) =>
|
|
|
+ if (GlobalData.qXZDatas[i].STNM.Contains(qxKey))
|
|
|
+ {
|
|
|
+ qxIndex = i;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ int swIndex = 0;
|
|
|
+ for (int i = 0; i < GlobalData.sWZDatas.Count; i++)
|
|
|
{
|
|
|
- SwitchStationStat(index);
|
|
|
- });
|
|
|
- }
|
|
|
+ if (GlobalData.sWZDatas[i].STNM.Contains(swkey))
|
|
|
+ {
|
|
|
+ swIndex = i;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- void SwitchStationStat(int index)
|
|
|
- {
|
|
|
- switch (index)
|
|
|
- {
|
|
|
- case 0:
|
|
|
- yunValue1.text = GlobalData.InspectionStat[currentYunIndex].daily.operationStaffCount.ToString();
|
|
|
- yunValue2.text = GlobalData.InspectionStat[currentYunIndex].daily.inspectionTasksCount.ToString();
|
|
|
- yunValue3.text = GlobalData.InspectionStat[currentYunIndex].daily.inspectionKilometers.ToString();
|
|
|
- yunValue4.text = GlobalData.InspectionStat[currentYunIndex].daily.faultHazardCount.ToString();
|
|
|
- yunValue5.text = GlobalData.InspectionStat[currentYunIndex].daily.processedFaultCount.ToString();
|
|
|
- yunValue6.text = GlobalData.InspectionStat[currentYunIndex].daily.engineeringMaintenanceCount.ToString();
|
|
|
+ swValue1.text = swH.ToString();
|
|
|
+ swValue2.text = GlobalData.qXZDatas[qxIndex].dropSum6.ToString();
|
|
|
+ //swValue3.text = GlobalData.locationWeatherData[index].temperature.ToString();
|
|
|
+ string we = GlobalData.sWZDatas[swIndex].wth.ToString();
|
|
|
+ string weatherText = "";
|
|
|
+ switch (we)
|
|
|
+ {
|
|
|
+ case "9":
|
|
|
+ weatherText = "晴天";
|
|
|
break;
|
|
|
- case 1:
|
|
|
- yunValue1.text = GlobalData.InspectionStat[currentYunIndex].monthly.operationStaffCount.ToString();
|
|
|
- yunValue2.text = GlobalData.InspectionStat[currentYunIndex].monthly.inspectionTasksCount.ToString();
|
|
|
- yunValue3.text = GlobalData.InspectionStat[currentYunIndex].monthly.inspectionKilometers.ToString();
|
|
|
- yunValue4.text = GlobalData.InspectionStat[currentYunIndex].monthly.faultHazardCount.ToString();
|
|
|
- yunValue5.text = GlobalData.InspectionStat[currentYunIndex].monthly.processedFaultCount.ToString();
|
|
|
- yunValue6.text = GlobalData.InspectionStat[currentYunIndex].monthly.engineeringMaintenanceCount.ToString();
|
|
|
+ case "8":
|
|
|
+ weatherText = "阴天";
|
|
|
break;
|
|
|
- case 2:
|
|
|
- yunValue1.text = GlobalData.InspectionStat[currentYunIndex].yearly.operationStaffCount.ToString();
|
|
|
- yunValue2.text = GlobalData.InspectionStat[currentYunIndex].yearly.inspectionTasksCount.ToString();
|
|
|
- yunValue3.text = GlobalData.InspectionStat[currentYunIndex].yearly.inspectionKilometers.ToString();
|
|
|
- yunValue4.text = GlobalData.InspectionStat[currentYunIndex].yearly.faultHazardCount.ToString();
|
|
|
- yunValue5.text = GlobalData.InspectionStat[currentYunIndex].yearly.processedFaultCount.ToString();
|
|
|
- yunValue6.text = GlobalData.InspectionStat[currentYunIndex].yearly.engineeringMaintenanceCount.ToString();
|
|
|
+ case "7":
|
|
|
+ weatherText = "雨天";
|
|
|
+ break;
|
|
|
+ case "6":
|
|
|
+ weatherText = "雨夹雪";
|
|
|
+ break;
|
|
|
+ case "5":
|
|
|
+ weatherText = "雪天";
|
|
|
break;
|
|
|
-
|
|
|
}
|
|
|
+ swValue4.text = weatherText;
|
|
|
+ //swValue5.text = GlobalData.locationWeatherData[index].floodDischarge.ToString();
|
|
|
}
|
|
|
|
|
|
- private async Task InitLayerBtns()
|
|
|
- {
|
|
|
- await new WaitUntil(() =>
|
|
|
+ private async Task InitFloodAreaData()
|
|
|
{
|
|
|
- return GlobalData.layerUnitDatas.Count > 0;
|
|
|
- });
|
|
|
- layerBtns = new List<LayerBtn>();
|
|
|
- for (int i = 0; i < zTLayer.layerDatas.Length; i++)
|
|
|
+ //Debug.Log(111111111);
|
|
|
+ await new WaitUntil(() =>
|
|
|
+ {
|
|
|
+ if (GlobalData.floodStorageArea.pumpStations != null)
|
|
|
+ return GlobalData.floodStorageArea.pumpStations.value > 0;
|
|
|
+ return false;
|
|
|
+ });
|
|
|
+ //Debug.Log(111111111);
|
|
|
+ floodStorageAreaData[0].text = GlobalData.floodStorageArea.area.value + "km²";
|
|
|
+ floodStorageAreaData[0].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.area.description;
|
|
|
+ floodStorageAreaData[1].text = GlobalData.floodStorageArea.leveeLength.value + "km";
|
|
|
+ floodStorageAreaData[1].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.leveeLength.description;
|
|
|
+ floodStorageAreaData[2].text = GlobalData.floodStorageArea.storageCapacity.value + "亿m";
|
|
|
+ floodStorageAreaData[2].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.storageCapacity.description;
|
|
|
+ floodStorageAreaData[3].text = GlobalData.floodStorageArea.designWaterLevel.value + "m";
|
|
|
+ floodStorageAreaData[3].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.designWaterLevel.description;
|
|
|
+ floodStorageAreaData[4].text = GlobalData.floodStorageArea.operationStandard.value + "级";
|
|
|
+ floodStorageAreaData[4].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.operationStandard.description;
|
|
|
+ floodStorageAreaData[5].text = GlobalData.floodStorageArea.safetyZones.value + "项";
|
|
|
+ floodStorageAreaData[5].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.safetyZones.description;
|
|
|
+ floodStorageAreaData[6].text = GlobalData.floodStorageArea.gateStations.value + "项";
|
|
|
+ floodStorageAreaData[6].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.gateStations.description;
|
|
|
+ floodStorageAreaData[7].text = GlobalData.floodStorageArea.pumpStations.value + "项";
|
|
|
+ floodStorageAreaData[7].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.pumpStations.description;
|
|
|
+ floodStorageAreaData[8].text = GlobalData.floodStorageArea.drainageStations.value + "项";
|
|
|
+ floodStorageAreaData[8].transform.parent.GetComponent<TipShower>().data = GlobalData.floodStorageArea.drainageStations.description;
|
|
|
+ }
|
|
|
+ private async Task InitFloodGateData()
|
|
|
+ {
|
|
|
+ await new WaitUntil(() =>
|
|
|
+ {
|
|
|
+ return GlobalData.floorGateData.success;
|
|
|
+ });
|
|
|
+
|
|
|
+ await new WaitUntil(() =>
|
|
|
+ {
|
|
|
+ return GlobalData.buYuanSensorData.data.Count > 0 && GlobalData.taoKouSensorData.data.Count > 0;
|
|
|
+ });
|
|
|
+
|
|
|
+ floodTexts[0].text = (GlobalData.floorGateData.BuYuanOperationalGates + GlobalData.floorGateData.TaoKouOperationalGates).ToString();
|
|
|
+ floodTexts[1].text = (GlobalData.floorGateData.BuYuanTotalGates + GlobalData.floorGateData.TaoKouTotalGates - GlobalData.floorGateData.BuYuanOperationalGates - GlobalData.floorGateData.TaoKouOperationalGates).ToString();
|
|
|
+ floodTexts[2].text = (GlobalData.floorGateData.BuYuanTotalGates + GlobalData.floorGateData.TaoKouTotalGates).ToString();
|
|
|
+ floodButton.onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ popWindow.gameObject.SetActive(true);
|
|
|
+ });
|
|
|
+ floodListExitBtn.onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ popWindow.gameObject.SetActive(false);
|
|
|
+ });
|
|
|
+ floodListBtns[0].onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ floodListBtns[0].GetComponent<Image>().sprite = sprites[0];
|
|
|
+ floodListBtns[1].GetComponent<Image>().sprite = sprites[1];
|
|
|
+ floodLists[0].transform.parent.parent.parent.gameObject.SetActive(true);
|
|
|
+ floodLists[1].transform.parent.parent.parent.gameObject.SetActive(false);
|
|
|
+ });
|
|
|
+ floodListBtns[1].onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ floodListBtns[0].GetComponent<Image>().sprite = sprites[1];
|
|
|
+ floodListBtns[1].GetComponent<Image>().sprite = sprites[0];
|
|
|
+ floodLists[0].transform.parent.parent.parent.gameObject.SetActive(false);
|
|
|
+ floodLists[1].transform.parent.parent.parent.gameObject.SetActive(true);
|
|
|
+ });
|
|
|
+ var buyuanData = GlobalData.buYuanSensorData.data;
|
|
|
+ for (int i = 0; i < buyuanData.Count; i++)
|
|
|
+ {
|
|
|
+ GameObject floodGateDataObj = Instantiate(floodDataPrefab);
|
|
|
+ floodGateDataObj.transform.SetParent(floodLists[0].transform);
|
|
|
+ floodGateDataObj.transform.localScale = Vector3.one;
|
|
|
+ floodGateDataObj.transform.GetChild(1).GetComponent<Text>().text = (i + 1).ToString("00") + "号闸门";
|
|
|
+ floodGateDataObj.transform.GetChild(7).GetComponent<Text>().text = buyuanData[i].gate_opening ? "开启" : "关闭";
|
|
|
+ floodGateDataObj.transform.GetChild(8).GetComponent<Text>().text = "- m³/s";
|
|
|
+ floodGateDataObj.transform.GetChild(9).GetComponent<Text>().text = "m";
|
|
|
+ floodGateDataObj.transform.GetChild(10).GetComponent<Text>().text = buyuanData[i].opening_degree * 0.01 + "m";
|
|
|
+ floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = buyuanData[i].gate_breakdown ? "故障" : "正常";
|
|
|
+ }
|
|
|
+ var taokouData = GlobalData.taoKouSensorData.data;
|
|
|
+ for (int i = 0; i < taokouData.Count; i++)
|
|
|
+ {
|
|
|
+ GameObject floodGateDataObj = Instantiate(floodDataPrefab);
|
|
|
+ floodGateDataObj.transform.SetParent(floodLists[1].transform);
|
|
|
+ floodGateDataObj.transform.localScale = Vector3.one;
|
|
|
+ floodGateDataObj.transform.GetChild(1).GetComponent<Text>().text = (i + 1).ToString("00") + "号闸门";
|
|
|
+ floodGateDataObj.transform.GetChild(7).GetComponent<Text>().text = taokouData[i].gate_opening ? "开启" : "关闭";
|
|
|
+ floodGateDataObj.transform.GetChild(8).GetComponent<Text>().text = "- m³/s";
|
|
|
+ floodGateDataObj.transform.GetChild(9).GetComponent<Text>().text = "m";
|
|
|
+ floodGateDataObj.transform.GetChild(10).GetComponent<Text>().text = taokouData[i].opening_degree * 0.01 + "m";
|
|
|
+ floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = taokouData[i].gate_breakdown ? "故障" : "正常";
|
|
|
+ }
|
|
|
+ // for (int i = 0; i < GlobalData.floorGateData.BuYuan.FloodGates.Length; i++)
|
|
|
+ // {
|
|
|
+ // GameObject floodGateDataObj = Instantiate(floodDataPrefab);
|
|
|
+ // floodGateDataObj.transform.SetParent(floodLists[0].transform);
|
|
|
+ // floodGateDataObj.transform.localScale = Vector3.one;
|
|
|
+ // floodGateDataObj.transform.GetChild(1).GetComponent<Text>().text = (i + 1).ToString("00") + "号闸门";
|
|
|
+ // floodGateDataObj.transform.GetChild(7).GetComponent<Text>().text = GlobalData.floorGateData.BuYuan.FloodGates[i].IsOpen ? "开启" : "关闭";
|
|
|
+ // floodGateDataObj.transform.GetChild(8).GetComponent<Text>().text = GlobalData.floorGateData.BuYuan.FloodGates[i].CurrentFlow + "m³/s";
|
|
|
+ // floodGateDataObj.transform.GetChild(9).GetComponent<Text>().text = GlobalData.floorGateData.BuYuan.CurrentWaterLevel + "m";
|
|
|
+ // floodGateDataObj.transform.GetChild(10).GetComponent<Text>().text = GlobalData.floorGateData.BuYuan.FloodGates[i].CurrentOpening + "°";
|
|
|
+ // switch (GlobalData.floorGateData.BuYuan.FloodGates[i].Status)
|
|
|
+ // {
|
|
|
+ // case 0:
|
|
|
+ // floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = "故障";
|
|
|
+ // break;
|
|
|
+ // case 1:
|
|
|
+ // floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = "正常";
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // for (int i = 0; i < GlobalData.floorGateData.TaoKou.FloodGates.Length; i++)
|
|
|
+ // {
|
|
|
+ // GameObject floodGateDataObj = Instantiate(floodDataPrefab);
|
|
|
+ // floodGateDataObj.transform.SetParent(floodLists[1].transform);
|
|
|
+ // floodGateDataObj.transform.localScale = Vector3.one;
|
|
|
+ // floodGateDataObj.transform.GetChild(1).GetComponent<Text>().text = (i + 1).ToString("00") + "号闸门";
|
|
|
+ // floodGateDataObj.transform.GetChild(7).GetComponent<Text>().text = GlobalData.floorGateData.TaoKou.FloodGates[i].IsOpen ? "开启" : "关闭";
|
|
|
+ // floodGateDataObj.transform.GetChild(8).GetComponent<Text>().text = GlobalData.floorGateData.TaoKou.FloodGates[i].CurrentFlow + "m³/s";
|
|
|
+ // floodGateDataObj.transform.GetChild(9).GetComponent<Text>().text = GlobalData.floorGateData.TaoKou.CurrentWaterLevel + "m";
|
|
|
+ // floodGateDataObj.transform.GetChild(10).GetComponent<Text>().text = GlobalData.floorGateData.TaoKou.FloodGates[i].CurrentOpening + "°";
|
|
|
+ // switch (GlobalData.floorGateData.TaoKou.FloodGates[i].Status)
|
|
|
+ // {
|
|
|
+ // case 0:
|
|
|
+ // floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = "故障";
|
|
|
+ // break;
|
|
|
+ // case 1:
|
|
|
+ // floodGateDataObj.transform.GetChild(11).GetComponent<Text>().text = "正常";
|
|
|
+ // break;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ List<double> doubles = new List<double>();
|
|
|
+ doubles.Add(90);
|
|
|
+ doubles.Add(100);
|
|
|
+ floodRingChart.UpdateData(0, 0, doubles);
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private async Task InitInspectionStatistics()
|
|
|
{
|
|
|
- LayerBtn layerBtn = Instantiate(zTLayer.layerBtnPrefab);
|
|
|
+ await new WaitUntil(() =>
|
|
|
+ {
|
|
|
+ return GlobalData.InspectionStat.Count > 0;
|
|
|
+ });
|
|
|
+ currentYunIndex = 0;
|
|
|
+ yunValue1.text = GlobalData.InspectionStat[0].daily.operationStaffCount.ToString();
|
|
|
+ yunValue2.text = GlobalData.InspectionStat[0].daily.inspectionTasksCount.ToString();
|
|
|
+ yunValue3.text = GlobalData.InspectionStat[0].daily.inspectionKilometers.ToString();
|
|
|
+ yunValue4.text = GlobalData.InspectionStat[0].daily.faultHazardCount.ToString();
|
|
|
+ yunValue5.text = GlobalData.InspectionStat[0].daily.processedFaultCount.ToString();
|
|
|
+ yunValue6.text = GlobalData.InspectionStat[0].daily.engineeringMaintenanceCount.ToString();
|
|
|
+ yunDrop0.onValueChanged.AddListener((index) =>
|
|
|
+ {
|
|
|
+ currentYunIndex = index;
|
|
|
+ SwitchStationStat(yunDrop1.value);
|
|
|
+ });
|
|
|
+ yunDrop1.onValueChanged.AddListener((index) =>
|
|
|
+ {
|
|
|
+ SwitchStationStat(index);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- layerBtn.SetUseful(false);
|
|
|
- int index = i;
|
|
|
- int num = 0;
|
|
|
- if (i == 0)
|
|
|
+ void SwitchStationStat(int index)
|
|
|
+ {
|
|
|
+ switch (index)
|
|
|
{
|
|
|
- List<LayerUnitData> tempDatas = new List<LayerUnitData>(GlobalData.layerUnitDatas);
|
|
|
- for (int j = 0; j < tempDatas.Count; j++)
|
|
|
+ case 0:
|
|
|
+ yunValue1.text = GlobalData.InspectionStat[currentYunIndex].daily.operationStaffCount.ToString();
|
|
|
+ yunValue2.text = GlobalData.InspectionStat[currentYunIndex].daily.inspectionTasksCount.ToString();
|
|
|
+ yunValue3.text = GlobalData.InspectionStat[currentYunIndex].daily.inspectionKilometers.ToString();
|
|
|
+ yunValue4.text = GlobalData.InspectionStat[currentYunIndex].daily.faultHazardCount.ToString();
|
|
|
+ yunValue5.text = GlobalData.InspectionStat[currentYunIndex].daily.processedFaultCount.ToString();
|
|
|
+ yunValue6.text = GlobalData.InspectionStat[currentYunIndex].daily.engineeringMaintenanceCount.ToString();
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ yunValue1.text = GlobalData.InspectionStat[currentYunIndex].monthly.operationStaffCount.ToString();
|
|
|
+ yunValue2.text = GlobalData.InspectionStat[currentYunIndex].monthly.inspectionTasksCount.ToString();
|
|
|
+ yunValue3.text = GlobalData.InspectionStat[currentYunIndex].monthly.inspectionKilometers.ToString();
|
|
|
+ yunValue4.text = GlobalData.InspectionStat[currentYunIndex].monthly.faultHazardCount.ToString();
|
|
|
+ yunValue5.text = GlobalData.InspectionStat[currentYunIndex].monthly.processedFaultCount.ToString();
|
|
|
+ yunValue6.text = GlobalData.InspectionStat[currentYunIndex].monthly.engineeringMaintenanceCount.ToString();
|
|
|
+ break;
|
|
|
+ case 2:
|
|
|
+ yunValue1.text = GlobalData.InspectionStat[currentYunIndex].yearly.operationStaffCount.ToString();
|
|
|
+ yunValue2.text = GlobalData.InspectionStat[currentYunIndex].yearly.inspectionTasksCount.ToString();
|
|
|
+ yunValue3.text = GlobalData.InspectionStat[currentYunIndex].yearly.inspectionKilometers.ToString();
|
|
|
+ yunValue4.text = GlobalData.InspectionStat[currentYunIndex].yearly.faultHazardCount.ToString();
|
|
|
+ yunValue5.text = GlobalData.InspectionStat[currentYunIndex].yearly.processedFaultCount.ToString();
|
|
|
+ yunValue6.text = GlobalData.InspectionStat[currentYunIndex].yearly.engineeringMaintenanceCount.ToString();
|
|
|
+ break;
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private async Task InitLayerBtns()
|
|
|
+ {
|
|
|
+ await new WaitUntil(() =>
|
|
|
+ {
|
|
|
+ return GlobalData.layerUnitDatas.Count > 0;
|
|
|
+ });
|
|
|
+ layerBtns = new List<LayerBtn>();
|
|
|
+ for (int i = 0; i < zTLayer.layerDatas.Length; i++)
|
|
|
+ {
|
|
|
+ LayerBtn layerBtn = Instantiate(zTLayer.layerBtnPrefab);
|
|
|
+
|
|
|
+ layerBtn.SetUseful(false);
|
|
|
+ int index = i;
|
|
|
+ int num = 0;
|
|
|
+ if (i == 0)
|
|
|
{
|
|
|
- if (tempDatas[j].special == "1")
|
|
|
+ List<LayerUnitData> tempDatas = new List<LayerUnitData>(GlobalData.layerUnitDatas);
|
|
|
+ for (int j = 0; j < tempDatas.Count; j++)
|
|
|
{
|
|
|
- int tempJ = j;
|
|
|
- SecLayerBtn secLayerBtn = Instantiate(zTLayer.secLayerBtnPrefab);
|
|
|
- secLayerBtn.SetLayerBtnData(tempDatas[j].name);
|
|
|
- secLayerBtn.GetComponent<RectTransform>().SetParent(layerBtn.secContent.GetComponent<RectTransform>());
|
|
|
- secLayerBtn.btn.onClick.AddListener(() =>
|
|
|
+ if (tempDatas[j].special == "1")
|
|
|
{
|
|
|
- StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
|
|
|
- miniMap.gameObject.SetActive(false);
|
|
|
- ChangeRightContent(tempJ);
|
|
|
- });
|
|
|
- num++;
|
|
|
+ int tempJ = j;
|
|
|
+ SecLayerBtn secLayerBtn = Instantiate(zTLayer.secLayerBtnPrefab);
|
|
|
+ secLayerBtn.SetLayerBtnData(tempDatas[j].name);
|
|
|
+ secLayerBtn.GetComponent<RectTransform>().SetParent(layerBtn.secContent.GetComponent<RectTransform>());
|
|
|
+ secLayerBtn.btn.onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
|
|
|
+ miniMap.gameObject.SetActive(false);
|
|
|
+ ChangeRightContent(tempJ);
|
|
|
+ });
|
|
|
+ num++;
|
|
|
+ }
|
|
|
}
|
|
|
+ layerBtn.secContent.gameObject.SetActive(true);
|
|
|
}
|
|
|
- layerBtn.secContent.gameObject.SetActive(true);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- List<LayerUnitData> tempDatas = new List<LayerUnitData>(GlobalData.layerUnitDatas);
|
|
|
- for (int j = 0; j < tempDatas.Count; j++)
|
|
|
+ else
|
|
|
{
|
|
|
- Debug.Log(zTLayer.layerDatas.Length);
|
|
|
- Debug.Log(i);
|
|
|
- if ((int)tempDatas[j].type == zTLayer.layerDatas[i].layerID)
|
|
|
+ List<LayerUnitData> tempDatas = new List<LayerUnitData>(GlobalData.layerUnitDatas);
|
|
|
+ for (int j = 0; j < tempDatas.Count; j++)
|
|
|
{
|
|
|
- int tempJ = j;
|
|
|
- SecLayerBtn secLayerBtn = Instantiate(zTLayer.secLayerBtnPrefab);
|
|
|
- secLayerBtn.SetLayerBtnData(tempDatas[j].name);
|
|
|
- secLayerBtn.GetComponent<RectTransform>().SetParent(layerBtn.secContent.GetComponent<RectTransform>());
|
|
|
- secLayerBtn.btn.onClick.AddListener(() =>
|
|
|
+ //Debug.Log(zTLayer.layerDatas.Length);
|
|
|
+ //Debug.Log(i);
|
|
|
+ if ((int)tempDatas[j].type == zTLayer.layerDatas[i].layerID)
|
|
|
{
|
|
|
- StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
|
|
|
- miniMap.gameObject.SetActive(false);
|
|
|
- ChangeRightContent(tempJ);
|
|
|
- });
|
|
|
- num++;
|
|
|
+ int tempJ = j;
|
|
|
+ SecLayerBtn secLayerBtn = Instantiate(zTLayer.secLayerBtnPrefab);
|
|
|
+ secLayerBtn.SetLayerBtnData(tempDatas[j].name);
|
|
|
+ secLayerBtn.GetComponent<RectTransform>().SetParent(layerBtn.secContent.GetComponent<RectTransform>());
|
|
|
+ secLayerBtn.btn.onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ StaticLod.instance.OnFoucusStatic(tempDatas[tempJ].namePri);
|
|
|
+ miniMap.gameObject.SetActive(false);
|
|
|
+ ChangeRightContent(tempJ);
|
|
|
+ });
|
|
|
+ num++;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- layerBtn.btn.GetComponent<Button>().onClick.AddListener(() =>
|
|
|
- {
|
|
|
- for (int j = 0; j < layerBtns.Count; j++)
|
|
|
+ layerBtn.btn.GetComponent<Button>().onClick.AddListener(() =>
|
|
|
{
|
|
|
- layerBtns[j].SetUseful(false);
|
|
|
- layerBtns[j].secContent.gameObject.SetActive(false);
|
|
|
- }
|
|
|
- layerBtns[index].SetUseful(true);
|
|
|
- layerBtns[index].secContent.gameObject.SetActive(true);
|
|
|
- });
|
|
|
-
|
|
|
- layerBtn.SetLayerBtnData(zTLayer.layerSprite[zTLayer.layerDatas[i].layerID], zTLayer.layerDatas[i].layerName, num.ToString());
|
|
|
- layerBtn.GetComponent<RectTransform>().SetParent(content.GetComponent<RectTransform>());
|
|
|
- layerBtn.transform.localScale = Vector3.one;
|
|
|
- layerBtns.Add(layerBtn);
|
|
|
+ for (int j = 0; j < layerBtns.Count; j++)
|
|
|
+ {
|
|
|
+ layerBtns[j].SetUseful(false);
|
|
|
+ layerBtns[j].secContent.gameObject.SetActive(false);
|
|
|
+ }
|
|
|
+ layerBtns[index].SetUseful(true);
|
|
|
+ layerBtns[index].secContent.gameObject.SetActive(true);
|
|
|
+ });
|
|
|
+
|
|
|
+ layerBtn.SetLayerBtnData(zTLayer.layerSprite[zTLayer.layerDatas[i].layerID], zTLayer.layerDatas[i].layerName, num.ToString());
|
|
|
+ layerBtn.GetComponent<RectTransform>().SetParent(content.GetComponent<RectTransform>());
|
|
|
+ layerBtn.transform.localScale = Vector3.one;
|
|
|
+ layerBtns.Add(layerBtn);
|
|
|
+ }
|
|
|
+ content.GetComponent<VerticalLayoutGroup>().SetLayoutVertical();
|
|
|
+ layerBtns[0].SetUseful(true);
|
|
|
}
|
|
|
- content.GetComponent<VerticalLayoutGroup>().SetLayoutVertical();
|
|
|
- layerBtns[0].SetUseful(true);
|
|
|
- }
|
|
|
|
|
|
- void ChangeRightContent(int index)
|
|
|
- {
|
|
|
- rightContent.parent.gameObject.SetActive(true);
|
|
|
- for (int i = 0; i < rightContent.childCount; i++)
|
|
|
+ void ChangeRightContent(int index)
|
|
|
{
|
|
|
- rightContent.GetChild(i).gameObject.SetActive(false);
|
|
|
+ rightContent.parent.gameObject.SetActive(true);
|
|
|
+ for (int i = 0; i < rightContent.childCount; i++)
|
|
|
+ {
|
|
|
+ rightContent.GetChild(i).gameObject.SetActive(false);
|
|
|
+ }
|
|
|
+ rightContent.GetChild(index).gameObject.SetActive(true);
|
|
|
}
|
|
|
- rightContent.GetChild(index).gameObject.SetActive(true);
|
|
|
- }
|
|
|
|
|
|
- // Update is called once per frame
|
|
|
- void Update()
|
|
|
- {
|
|
|
- znz.transform.rotation = Quaternion.Lerp(znz.transform.rotation, Quaternion.Euler(0, 0, CameraManager.instance.mainCamera.transform.localEulerAngles.y), Time.deltaTime * 4);
|
|
|
- }
|
|
|
-
|
|
|
- public async Task InitObsItems()
|
|
|
- {
|
|
|
- await new WaitUntil(() =>
|
|
|
+ // Update is called once per frame
|
|
|
+ void Update()
|
|
|
{
|
|
|
- return GlobalData.obsDatas_by.Count > 0&& GlobalData.obsDatas_tk.Count>0;
|
|
|
- });
|
|
|
- for (int i = 0; i < obsItemList.Count; i++)
|
|
|
- {
|
|
|
- Destroy(obsItemList[i].gameObject);
|
|
|
+ znz.transform.rotation = Quaternion.Lerp(znz.transform.rotation, Quaternion.Euler(0, 0, CameraManager.instance.mainCamera.transform.localEulerAngles.y), Time.deltaTime * 4);
|
|
|
}
|
|
|
- obsItemList.Clear();
|
|
|
- var obsDatasBy = GlobalData.obsDatas_by;
|
|
|
- for (int i = 0; i < obsDatasBy.Count; i++)
|
|
|
+
|
|
|
+ public async Task InitObsItems()
|
|
|
{
|
|
|
- var tempObj = Instantiate(obsItemPrefab, obsItemContent).GetComponent<ObsItem>();
|
|
|
- tempObj.SetData(obsDatasBy[i]);
|
|
|
- tempObj._button.onClick.AddListener(() =>
|
|
|
+ await new WaitUntil(() =>
|
|
|
{
|
|
|
- ShowObsPanel(tempObj._data);
|
|
|
+ return GlobalData.obsDatas_by.Count > 0 && GlobalData.obsDatas_tk.Count > 0;
|
|
|
});
|
|
|
- obsItemList.Add(tempObj);
|
|
|
- }
|
|
|
- var obsDatasTk = GlobalData.obsDatas_tk;
|
|
|
- for (int i = 0; i < obsDatasTk.Count; i++)
|
|
|
- {
|
|
|
- var tempObj = Instantiate(obsItemPrefab, obsItemContent).GetComponent<ObsItem>();
|
|
|
- tempObj.SetData(obsDatasTk[i]);
|
|
|
- tempObj._button.onClick.AddListener(() =>
|
|
|
+ for (int i = 0; i < obsItemList.Count; i++)
|
|
|
{
|
|
|
- ShowObsPanel(tempObj._data);
|
|
|
- });
|
|
|
- obsItemList.Add(tempObj);
|
|
|
+ Destroy(obsItemList[i].gameObject);
|
|
|
+ }
|
|
|
+ obsItemList.Clear();
|
|
|
+ var obsDatasBy = GlobalData.obsDatas_by;
|
|
|
+ for (int i = 0; i < obsDatasBy.Count; i++)
|
|
|
+ {
|
|
|
+ var tempObj = Instantiate(obsItemPrefab, obsItemContent).GetComponent<ObsItem>();
|
|
|
+ tempObj.SetData(obsDatasBy[i]);
|
|
|
+ tempObj._button.onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ ShowObsPanel(tempObj._data);
|
|
|
+ });
|
|
|
+ obsItemList.Add(tempObj);
|
|
|
+ }
|
|
|
+ var obsDatasTk = GlobalData.obsDatas_tk;
|
|
|
+ for (int i = 0; i < obsDatasTk.Count; i++)
|
|
|
+ {
|
|
|
+ var tempObj = Instantiate(obsItemPrefab, obsItemContent).GetComponent<ObsItem>();
|
|
|
+ tempObj.SetData(obsDatasTk[i]);
|
|
|
+ tempObj._button.onClick.AddListener(() =>
|
|
|
+ {
|
|
|
+ ShowObsPanel(tempObj._data);
|
|
|
+ });
|
|
|
+ obsItemList.Add(tempObj);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
|
|
|
- public void SearchObsItem(string s_name)
|
|
|
- {
|
|
|
- if (s_name.Equals(""))
|
|
|
+ public void SearchObsItem(string s_name)
|
|
|
{
|
|
|
- for (int i = 0; i < obsItemList.Count; i++)
|
|
|
+ if (s_name.Equals(""))
|
|
|
{
|
|
|
- obsItemList[i].gameObject.SetActive(true);
|
|
|
+ for (int i = 0; i < obsItemList.Count; i++)
|
|
|
+ {
|
|
|
+ obsItemList[i].gameObject.SetActive(true);
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- for (int i = 0; i < obsItemList.Count; i++)
|
|
|
+ else
|
|
|
{
|
|
|
- obsItemList[i].gameObject.SetActive(obsItemList[i]._data.name.Contains(s_name));
|
|
|
+ for (int i = 0; i < obsItemList.Count; i++)
|
|
|
+ {
|
|
|
+ obsItemList[i].gameObject.SetActive(obsItemList[i]._data.name.Contains(s_name));
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- public void ShowObsPanel(ObsData _data)
|
|
|
- {
|
|
|
- obsPlayerPanel.gameObject.SetActive(true);
|
|
|
- obsPlayerPanel.SetObsData(_data);
|
|
|
- obsPlayerPanel.SetTitle(_data.name);
|
|
|
+ public void ShowObsPanel(ObsData _data)
|
|
|
+ {
|
|
|
+ obsPlayerPanel.gameObject.SetActive(true);
|
|
|
+ obsPlayerPanel.SetObsData(_data);
|
|
|
+ obsPlayerPanel.SetTitle(_data.name);
|
|
|
+ }
|
|
|
}
|
|
|
-}
|