public override void Init() { base.Init(); m_PlayerListButton.onClick.AddListener(OnPlayerListButtonClick); m_ChatButton.onClick.AddListener(OnChatButtonClick); m_LeaveRoomButton.onClick.AddListener(OnLeaveRoomButtonClick); m_PV = GetComponent <PhotonView>(); InRoomContentHandler handler = (InRoomContentHandler)m_ContentHandler; handler.Init(); handler.ReadyStatusChanged += OnInRoomReadyStatusChange; handler.ChatMessageHandled += OnChatMessageHandled; handler.CountdownStopped += OnCountdownStopped; }
protected override void OnDisable() { base.OnDisable(); SetInteractableStateOfContentButtons(true); SetActiveStateOfContent(ContentType.PlayerList, false); SetActiveStateOfContent(ContentType.Chat, false); m_ClosingCountdownSuccesfully = false; m_ContentOpen = ContentType.None; InRoomContentHandler handler = (InRoomContentHandler)m_ContentHandler; handler.ClearChat(); handler.ClearChatInput(); PlayerManager.Instance.SetInRoomStatus(InRoomStatus.Inactive); }