コード例 #1
0
 private void OnCreateConnect(OpenChatEvent chat)
 {
     m_ButtonTalk.SetActive(true);
     m_SpriteOtherIcon.gameObject.SetActive(false);
     m_LabelOtherName.text = chat.BidderName;
 }
コード例 #2
0
        public void Read(TProtocol iprot)
        {
            TField field;

            iprot.ReadStructBegin();
            while (true)
            {
                field = iprot.ReadFieldBegin();
                if (field.Type == TType.Stop)
                {
                    break;
                }
                switch (field.ID)
                {
                case 10:
                    if (field.Type == TType.I16)
                    {
                        ActionType = iprot.ReadI16();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 20:
                    if (field.Type == TType.Struct)
                    {
                        OpenChat = new OpenChatEvent();
                        OpenChat.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 30:
                    if (field.Type == TType.Struct)
                    {
                        CloseChat = new CloseChatEvent();
                        CloseChat.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 40:
                    if (field.Type == TType.Struct)
                    {
                        ChatMessage = new ChatInfoEvent();
                        ChatMessage.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 50:
                    if (field.Type == TType.Struct)
                    {
                        AcceptBid = new AcceptBidEvent();
                        AcceptBid.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 60:
                    if (field.Type == TType.Struct)
                    {
                        RefuseBid = new RefuseBidEvent();
                        RefuseBid.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 70:
                    if (field.Type == TType.Struct)
                    {
                        CloseSale = new CloseSaleEvent();
                        CloseSale.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 80:
                    if (field.Type == TType.Struct)
                    {
                        Bid = new BidEvent();
                        Bid.Read(iprot);
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }