SheBeiShiShiType.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using XCharts.Runtime;
  6. public class SheBeiShiShiType : UpdateManager
  7. {
  8. public Text runtext;
  9. public Text guzhangtext;
  10. public Text daijitext;
  11. public Text lixiantext;
  12. public RingChart runrc;
  13. public RingChart guzhangrc;
  14. public RingChart daijirc;
  15. public RingChart lixianrc;
  16. override public void updateData()
  17. {
  18. base.updateData();
  19. StartCoroutine(DeMaDataManager.Instance.GetShishiType((str)=>{
  20. runtext.text = str[0].ct.ToString();
  21. SerieData data1 = runrc.series[0].GetSerieData(0);
  22. data1.data[0] = str[0].ct;
  23. data1.data[1] = 100;
  24. guzhangtext.text = str[0].ct.ToString();
  25. SerieData data2 = guzhangrc.series[0].GetSerieData(0);
  26. data2.data[0] = str[1].ct;
  27. data2.data[1] = 100;
  28. daijitext.text = str[0].ct.ToString();
  29. SerieData data3 = daijirc.series[0].GetSerieData(0);
  30. data3.data[0] = str[2].ct;
  31. data3.data[1] = 100;
  32. lixiantext.text = str[0].ct.ToString();
  33. SerieData data4 = lixianrc.series[0].GetSerieData(0);
  34. data4.data[0] = str[3].ct;
  35. data4.data[1] = 100;
  36. })) ;
  37. }
  38. }