public override void OnInitObject()
 {
     base.OnInitObject();
     // ROOM
     this.m_Rooms          = new List <CRoomItem>();
     this.m_RoomContent    = CRootManager.FindObjectWith(GameObject, "RoomContent");
     this.m_RoomItemPrefab = Resources.Load <CRoomItem>("Items/RoomItem");
     this.m_RoomLoaded     = false;
     // BUTTONS
     this.m_JoinRandomButton = CRootManager.FindObjectWith(GameObject, "JoinRandomButton").GetComponent <Button>();
     this.m_RefreshButton    = CRootManager.FindObjectWith(GameObject, "RefreshButton").GetComponent <Button>();
     this.m_ExitButton       = CRootManager.FindObjectWith(GameObject, "ExitButton").GetComponent <Button>();
     this.m_OpenChatButton   = CRootManager.FindObjectWith(GameObject, "OpenChatButton").GetComponent <Button>();
     this.m_SoundOnOffButton = CRootManager.FindObjectWith(GameObject, "SoundOnOffButton").GetComponent <Button>();
     this.m_SoundOffImage    = CRootManager.FindObjectWith(GameObject, "SoundOffImage");
     this.m_SoundOnImage     = CRootManager.FindObjectWith(GameObject, "SoundOnImage");
     this.m_SoundOffImage.SetActive(CGameSetting.SETTING_SOUND_MUTE);
     this.m_SoundOnImage.SetActive(!CGameSetting.SETTING_SOUND_MUTE);
     CSoundManager.Instance.MuteAll(CGameSetting.SETTING_SOUND_MUTE);
     this.m_ShowTutorialButton = CRootManager.FindObjectWith(GameObject, "ShowTutorialButton").GetComponent <Button>();
     this.m_OpenShopButton     = CRootManager.FindObjectWith(GameObject, "OpenShopButton").GetComponent <Button>();
     // GOLD
     this.m_GoldDisplayText = CRootManager.FindObjectWith(GameObject, "GoldDisplayText").GetComponent <Text>();
     // OFF EVENTS
     // CSocketManager.Instance.Off("updateRoomStatus", this.ReceiveRoomList);
     // CSocketManager.Instance.Off("joinRoomFailed", this.OnJoinRoomFailed);
     // ON EVENTS
     CSocketManager.Instance.On("updateRoomStatus", this.ReceiveRoomList);
     CSocketManager.Instance.On("updateRoomSize", this.ReceiveRoomSize);
     CSocketManager.Instance.On("joinRoomCompleted", this.OnJoinRoomCompleted);
     CSocketManager.Instance.On("joinRoomFailed", this.OnJoinRoomFailed);
     // BUTTONS
     this.m_JoinRandomButton.onClick.AddListener(this.OnJoinRandomClick);
     this.m_RefreshButton.onClick.AddListener(this.OnRefreshClick);
     this.m_ExitButton.onClick.AddListener(this.OnExitClick);
     this.m_OpenChatButton.onClick.AddListener(this.OnOpenChatClick);
     this.m_SoundOnOffButton.onClick.AddListener(this.OnSoundOnOffClick);
     this.m_ShowTutorialButton.onClick.AddListener(this.OnShowTutorialClick);
     this.m_OpenShopButton.onClick.AddListener(this.OnOpenShopClick);
 }
 protected virtual void JoinRoom(CRoomItem room)
 {
     this.JoinRoom(room.roomName);
 }