|
@@ -185,6 +185,7 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
private InputField _obsSearchInputField;
|
|
|
|
|
|
public GameObject WaterRangeCtrlPanel;
|
|
|
+ public GameObject sunshigaikuangPanel;
|
|
|
|
|
|
public GameObject yjPrefab;
|
|
|
public Button[] yjBtns;
|
|
@@ -192,6 +193,18 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
|
|
|
public Sprite[] sprites;
|
|
|
|
|
|
+ public Text ymmjText;
|
|
|
+ public Text ymgdText;
|
|
|
+ public Text yxrkText;
|
|
|
+ public Text ccssText;
|
|
|
+
|
|
|
+ public VerticalLayoutGroup shuiShiliebiaoParent;
|
|
|
+
|
|
|
+ public List<ShuiShiLieBiaoItem> shuiShiLieBiaoItems = new List<ShuiShiLieBiaoItem>();
|
|
|
+ public ShuiShiLieBiaoItem shuiShiLieBiaoItem;
|
|
|
+
|
|
|
+ public WaterRangeCtrlTool mTools;
|
|
|
+
|
|
|
async void Start()
|
|
|
{
|
|
|
CameraManager.SwitchCamera(0);
|
|
@@ -216,9 +229,48 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
InitInspectionStatistics();
|
|
|
|
|
|
InitAlert();
|
|
|
+
|
|
|
+ InitData();
|
|
|
}
|
|
|
|
|
|
|
|
|
+ public async void InitData()
|
|
|
+ {
|
|
|
+
|
|
|
+ WWW www = new WWW(Application.streamingAssetsPath + "/areaBaseData.json");
|
|
|
+ await new UnityAsync.WaitUntil(() => { return www.isDone; });
|
|
|
+ string areaBaseDataContent = www.text;
|
|
|
+ GlobalData.areaFHXSDatas = JsonConvert.DeserializeObject<List<AreaFHXSData>>(areaBaseDataContent);
|
|
|
+ for (int i = 0; i < GlobalData.areaFHXSDatas.Count; i++)
|
|
|
+ {
|
|
|
+ ShuiShiLieBiaoItem tempItem = Instantiate(shuiShiLieBiaoItem);
|
|
|
+ shuiShiLieBiaoItems.Add(tempItem);
|
|
|
+ tempItem.transform.SetParent(shuiShiliebiaoParent.transform);
|
|
|
+ tempItem.transform.localScale = Vector3.one;
|
|
|
+ tempItem.SetData(GlobalData.areaFHXSDatas[i]);
|
|
|
+ tempItem.Evaluate(1);
|
|
|
+ }
|
|
|
+
|
|
|
+ mTools.onCtrlChange = (float value) =>
|
|
|
+ {
|
|
|
+ float ymmj = 0;
|
|
|
+ float ymgd = 0;
|
|
|
+ float yxrk = 0;
|
|
|
+ float ccss = 0;
|
|
|
+ for (int i = 0; i < shuiShiLieBiaoItems.Count; i++)
|
|
|
+ {
|
|
|
+ shuiShiLieBiaoItems[i].Evaluate(value);
|
|
|
+ ymmj += shuiShiLieBiaoItems[i].currentMianJi;
|
|
|
+ ymgd += shuiShiLieBiaoItems[i].currentGenDi;
|
|
|
+ yxrk += shuiShiLieBiaoItems[i].currentRenKou;
|
|
|
+ ccss += shuiShiLieBiaoItems[i].currentCaiChan;
|
|
|
+ }
|
|
|
+ ymmjText.text = ymmj.ToString("0.00") + "<color=#A5BFE2>平方公里</color>";
|
|
|
+ ymgdText.text = ymgd.ToString("0.0") + "<color=#A5BFE2>亩</color>";
|
|
|
+ yxrkText.text = yxrk.ToString("0") + "<color=#A5BFE2>个</color>";
|
|
|
+ ccssText.text = ccss.ToString("0.00") + "<color=#A5BFE2>亿元</color>";
|
|
|
+ };
|
|
|
+ }
|
|
|
|
|
|
void InitButton()
|
|
|
{
|
|
@@ -271,7 +323,7 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
gkButton.gameObject.SetActive(false);
|
|
|
clearBtn.gameObject.SetActive(false);
|
|
|
WaterRangeCtrlPanel.SetActive(true);
|
|
|
-
|
|
|
+ sunshigaikuangPanel.SetActive(true);
|
|
|
});
|
|
|
exit_ddysButton.onClick.AddListener(() =>
|
|
|
{
|
|
@@ -284,6 +336,7 @@ public class BigScreenLayer : MonoBehaviour
|
|
|
gkButton.gameObject.SetActive(true);
|
|
|
clearBtn.gameObject.SetActive(true);
|
|
|
ddysButton.gameObject.SetActive(true);
|
|
|
+ sunshigaikuangPanel.SetActive(false);
|
|
|
|
|
|
});
|
|
|
// public Button ddysButton;
|