private void HandleInvationMatchFeedback( byte[] data )
        {
            UILockManager.ResetGroupState( UIEventGroup.Middle );

            InvitationMatchS2C feedback = ProtobufUtils.Deserialize<InvitationMatchS2C>( data );

            if ( feedback.result )
            {
                switch ( feedback.state )
                {
                    case InvitationState.AcceptInvitation:
                        view.OpenFightMatchView( matcherReadyDatas );
                        break;
                    case InvitationState.RefuseInvitation:
                    case InvitationState.DestroyInvitation:
                        view.CloseView();
                        break;
                    case InvitationState.FriendInBattle:
                        view.CloseView();
                        OpenPopUp( "提示", "您的好友已进入战斗" );
                        break;
                    case InvitationState.FriendInMatching:
                        view.CloseView();
                        OpenPopUp( "提示", "您的好友已在匹配中" );
                        break;
                }
            }
        }
Пример #2
0
        private void HandleInvationMatchFeedback(byte[] data)
        {
            InvitationMatchS2C feedback = ProtobufUtils.Deserialize <InvitationMatchS2C>(data);

            if (feedback.result)
            {
                switch (feedback.state)
                {
                case InvitationState.FriendInBattle:
                    view.PopFriendInBattle();
                    SendInvitationListC2S();
                    currentFriendItem = null;
                    break;

                case InvitationState.FriendInMatching:
                    view.PopFriendInMatching();
                    SendInvitationListC2S();
                    currentFriendItem = null;
                    break;

                case InvitationState.WaitingProcess:
                    currentFriendItem.SetInvationButtonState(false);
                    isInvite = true;
                    break;

                case InvitationState.AcceptInvitation:
                    break;

                case InvitationState.RefuseInvitation:
                    break;

                case InvitationState.CancelInvitation:
                    matcherReadyDatas.Clear();
                    currentFriendItem = null;
                    view.OnExit(true);
                    break;

                case InvitationState.FriendReady:
                    view.SetFriendReadyState(true);
                    break;

                case InvitationState.FriendCancelReady:
                    view.SetFriendReadyState(false);
                    break;

                case InvitationState.StartMatch:
                    currentFriendId = GetFriendMatcherReadyData().playerId;
                    SendApplyRoomC2S();
                    break;

                case InvitationState.RepeatSendInvitation:
                    break;

                case InvitationState.DestroyInvitation:
                    break;
                }
            }
        }