RoomInfo.cs 738 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. 
  2. using SC.XR.Unity;
  3. using UnityEngine;
  4. using static ScenesManager;
  5. public class RoomInfo : RemoteSingleton<RoomInfo>
  6. {
  7. public GameObject chatShowBT;
  8. public ChatTextManager ctManager;
  9. public override void initShow()
  10. {
  11. base.initShow();
  12. ctManager.DeletText();
  13. ctManager.joinRoom();
  14. showChat();
  15. }
  16. public void showChat()
  17. {
  18. chatShowBT.SetActive(false);
  19. ctManager.gameObject.SetActive(true);
  20. }
  21. public void closeChat()
  22. {
  23. chatShowBT.SetActive(true);
  24. ctManager.gameObject.SetActive(false);
  25. }
  26. public void ResetChatText()
  27. {
  28. if (!ctManager.gameObject.activeSelf)
  29. {
  30. showChat();
  31. }
  32. }
  33. }