Thing0.cs 656 B

123456789101112131415161718192021222324252627
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class Thing0 : MonoBehaviour
  6. {
  7. public Text mID;
  8. public Text mName;
  9. public Text mArea;
  10. public Text mOnOff;
  11. public Text mState;
  12. public void SetData(string id,string name,string area,string onoff,string state) {
  13. mID.text = id;
  14. mName.text = name;
  15. mArea.text = area;
  16. mOnOff.text = onoff;
  17. if (state == "Õý³£")
  18. {
  19. mState.color = new Color(0.41f, 0.65f, 0.89f);
  20. }
  21. else {
  22. mState.color = Color.red;
  23. }
  24. mState.text = state;
  25. }
  26. }