wsdItem.cs 631 B

123456789101112131415161718192021222324252627282930
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. using static Manager;
  6. public class wsdItem : MonoBehaviour
  7. {
  8. public Text wname;
  9. public Text wwd;
  10. public Text wsd;
  11. public int jli;
  12. public void initData(ServerjiguiData data,int idx)
  13. {
  14. jli = data.id;
  15. wname.text = data.name;
  16. wwd.text = data.wendu+ "°C";
  17. wsd.text = data.shidu + "%";
  18. if(idx ==0 )
  19. {
  20. Invoke("chooseitem",1f);
  21. }
  22. }
  23. public void chooseitem()
  24. {
  25. DianLiJianKongManager.Instance.chooseJiGuiToggle(jli);
  26. }
  27. }