Esempio n. 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    if (source_ == null)
                    {
                        source_ = new global::Com.Violet.Rpc.ChessData();
                    }
                    input.ReadMessage(source_);
                    break;
                }

                case 18: {
                    if (target_ == null)
                    {
                        target_ = new global::Com.Violet.Rpc.ChessData();
                    }
                    input.ReadMessage(target_);
                    break;
                }

                case 24: {
                    ChessMoveResult = input.ReadInt32();
                    break;
                }

                case 32: {
                    Counter = input.ReadInt32();
                    break;
                }

                case 42: {
                    if (operator_ == null)
                    {
                        operator_ = new global::Com.Violet.Rpc.PlayerInfo();
                    }
                    input.ReadMessage(operator_);
                    break;
                }
                }
            }
        }
Esempio n. 2
0
 public void MergeFrom(ChessMovePush other)
 {
     if (other == null)
     {
         return;
     }
     if (other.source_ != null)
     {
         if (source_ == null)
         {
             source_ = new global::Com.Violet.Rpc.ChessData();
         }
         Source.MergeFrom(other.Source);
     }
     if (other.target_ != null)
     {
         if (target_ == null)
         {
             target_ = new global::Com.Violet.Rpc.ChessData();
         }
         Target.MergeFrom(other.Target);
     }
     if (other.ChessMoveResult != 0)
     {
         ChessMoveResult = other.ChessMoveResult;
     }
     if (other.Counter != 0)
     {
         Counter = other.Counter;
     }
     if (other.operator_ != null)
     {
         if (operator_ == null)
         {
             operator_ = new global::Com.Violet.Rpc.PlayerInfo();
         }
         Operator.MergeFrom(other.Operator);
     }
 }