private void OnConnectSuccess()
 {
     m_Txt_connecte_Txt.text = "Connection Success";
     //Enter the menu after 2 seconds
     TimeDelay.SetTimeout(() => {
         UIManager.HideUI(Def.UIDef.UI_Connect);
         UIManager.ShowUI(Def.UIDef.UI_Main);
     }, 2f);
 }
Beispiel #2
0
        public override void OnShow(object param)
        {
            base.OnShow(param);
            ActionOnShow.RegAction(RoomManager.instance.OnNewPlayerEnterRoom, OnNewPlayerEnterRoom);
            ActionOnShow.RegAction(RoomManager.instance.OnOtherPlayerLeftRoom, OnOtherPlayerLeftRoom);
            ActionOnShow.RegAction(RoomManager.instance.OnLevelLoadEnd, OnLevelLoadEnd);

            UIHelper.ClearTemplateChild(m_grid_Trans.gameObject);
            TimeDelay.SetTimeout(() => { UpdateInfo(); }, 0.5f);

            //If Not Host, Hide StartGame Button
            m_Btn_start4_Btn.gameObject.SetActive(RoomManager.instance.IsHost());
            m_Btn_start4_Btn.enabled = RoomManager.instance.IsRoomFull();
        }