XunJianException.cs 908 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using SC.XR.Unity;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEngine;
  5. using UnityEngine.UI;
  6. using TMPro;
  7. using static LangChaoJiekou;
  8. public class XunJianException : MonoBehaviour
  9. {
  10. public SCInputField scInput;
  11. public List<XunJianErrorBtn> listErrorBtn;
  12. public void SetText(TMP_Text text)
  13. {
  14. scInput.text += text.text;
  15. scInput.onValueChanged.AddListener(( v) =>
  16. {
  17. XunJianInitialize.Instance.xjDetails.isUpdata = true;
  18. });
  19. }
  20. public void InitData( RoomItem data )
  21. {
  22. for (int i = 0; i < listErrorBtn.Count; i++)
  23. {
  24. listErrorBtn[i].gameObject.SetActive(false);
  25. }
  26. for (int i = 0; i < data.errorList.Count; i++)
  27. {
  28. listErrorBtn[i].gameObject.SetActive(true);
  29. listErrorBtn[i].SetName(data.errorList[i].itemErrorName);
  30. }
  31. }
  32. }