Beispiel #1
0
    /// <summary>
    /// 打开玩家信息
    /// </summary>
    private void OpenPlayerInfo()
    {
        if (_data == null)
        {
            return;
        }
        var getPlayerInfoC2S = new GetUserInfoByIdC2S();

        getPlayerInfoC2S.userId = _data.userId;
        NetMgr.Instance.SendBuff(SocketType.HALL, MsgNoC2S.C2S_Hall_Get_UserInfo_By_Id.GetHashCode(), 0, getPlayerInfoC2S);
    }
Beispiel #2
0
 /// <summary>
 /// 绑定顶部UI按钮事件
 /// </summary>
 private void TopMenuAddEvent()
 {
     View.TopView.ButtonAddListening(View.TopView.photoButton,
                                     () => {
         if (GlobalData.LoginServer != "127.0.0.1")
         {
             PlayerInfoProxy playerInfoProxy = Facade.RetrieveProxy(Proxys.PLAYER_PROXY) as PlayerInfoProxy;
             var getPlayerInfoC2S            = new GetUserInfoByIdC2S();
             getPlayerInfoC2S.userId         = playerInfoProxy.userID;
             NetMgr.Instance.SendBuff(SocketType.HALL, MsgNoC2S.C2S_Hall_Get_UserInfo_By_Id.GetHashCode(), 0, getPlayerInfoC2S);
         }
         else
         {
             UIManager.Instance.ShowUI(UIViewID.PLATER_INFO_VIEW);
         }
     });
     View.TopView.ButtonAddListening(View.TopView.roomCardButton,
                                     () => {
         UIManager.Instance.ShowUI(UIViewID.SHOPPINGTIPS_VIEW);
         //PlayerInfoProxy pip = Facade.RetrieveProxy(Proxys.PLAYER_PROXY) as PlayerInfoProxy;
         //if (pip.boundAgency == ErrorCode.SUCCESS)
         //{
         //    UIManager.Instance.ShowUI(UIViewID.SHOPPING_VIEW);
         //}
         //else if (pip.boundAgency == ErrorCode.FAILT)
         //{
         //    UIManager.Instance.ShowUI(UIViewID.INVITE_VIEW);
         //}
     });
     View.TopView.ButtonAddListening(View.TopView.signinButton,
                                     () => {
         UIManager.Instance.ShowUI(UIViewID.SIGNIN_VIEW);
     });
     View.TopView.ButtonAddListening(View.TopView.helpButton,
                                     () => {
         UIManager.Instance.ShowUI(UIViewID.HELP_VIEW);
     });
     View.TopView.ButtonAddListening(View.TopView.backButton,
                                     () => {
         UIManager.Instance.Background.color = new Color(1, 1, 1, 0);
         UIManager.Instance.Background.gameObject.SetActive(true);
         UIManager.Instance.Background.DOColor(new Color(1, 1, 1, 1), 0.5f).SetEase(Ease.Linear).OnComplete(
             () => {
             var loadInfo = new LoadSceneInfo(ESceneID.SCENE_LOGIN, LoadSceneType.SYNC, LoadSceneMode.Single);
             ApplicationFacade.Instance.SendNotification(NotificationConstant.MEDI_GAMEMGR_LOADSCENE, loadInfo);
         });
     });
 }