ShiShiYongDian.cs 921 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class ShiShiYongDian : UpdateManager
  6. {
  7. public List<Text> texts;
  8. override public void updateData()
  9. {
  10. base.updateData();
  11. StartCoroutine(GetItems());
  12. }
  13. public IEnumerator GetItems()
  14. {
  15. CameraToPose[] cps=new CameraToPose[0];
  16. while(cps.Length<10)
  17. {
  18. cps =this.GetComponentsInChildren<CameraToPose>();
  19. yield return null;
  20. }
  21. StartCoroutine(DeMaDataManager.Instance.GetUseDianLiang((str)=>{
  22. for (int i = 0; i < str.Count;i++)
  23. {
  24. if( str[i].name.ToString()!="")
  25. cps[i].GetComponentsInChildren<Text>()[0].text = str[i].name.ToString();
  26. cps[i].GetComponentsInChildren<Text>()[1].text = str[i].f.ToString();
  27. }
  28. })) ;
  29. }
  30. }