AllotPanel.cs 680 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using TMPro;
  5. public class AllotPanel : MonoSingleton<AllotPanel>
  6. {
  7. public TMP_Text allotText;
  8. private float times = 0;
  9. public void SetAllotText( string msg)
  10. {
  11. allotText.text = msg;
  12. }
  13. private void OnEnable()
  14. {
  15. times = 0;
  16. }
  17. private void Update()
  18. {
  19. times += Time.deltaTime;
  20. if(times>120)
  21. {
  22. times = 0;
  23. Debug.LogError(" 申请协助超时!!!! ");
  24. if (RTCRoomManager.Instance.rtcState != RTCEnum.OFF)
  25. RTCRoomManager.Instance.LeaveChannel();
  26. }
  27. }
  28. }