Example #1
0
 public void MergeFrom(PlayerInfo other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.position_ != null)
     {
         if (position_ == null)
         {
             Position = new global::BBMessage.Types.Vector3();
         }
         Position.MergeFrom(other.Position);
     }
     if (other.rotation_ != null)
     {
         if (rotation_ == null)
         {
             Rotation = new global::BBMessage.Types.Vector3();
         }
         Rotation.MergeFrom(other.Rotation);
     }
     direction_.Add(other.direction_);
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Example #2
0
            public void MergeFrom(pb::CodedInputStream input)
            {
                uint tag;

                while ((tag = input.ReadTag()) != 0)
                {
                    switch (tag)
                    {
                    default:
                        _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                        break;

                    case 10:
                    {
                        Name = input.ReadString();
                        break;
                    }

                    case 18:
                    {
                        if (position_ == null)
                        {
                            Position = new global::BBMessage.Types.Vector3();
                        }
                        input.ReadMessage(Position);
                        break;
                    }

                    case 26:
                    {
                        if (rotation_ == null)
                        {
                            Rotation = new global::BBMessage.Types.Vector3();
                        }
                        input.ReadMessage(Rotation);
                        break;
                    }

                    case 34:
                    case 32:
                    {
                        direction_.AddEntriesFrom(input, _repeated_direction_codec);
                        break;
                    }
                    }
                }
            }
Example #3
0
            public void MergeFrom(pb::CodedInputStream input)
            {
      #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
                input.ReadRawMessage(this);
      #else
                uint tag;
                while ((tag = input.ReadTag()) != 0)
                {
                    switch (tag)
                    {
                    default:
                        _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                        break;

                    case 10: {
                        Name = input.ReadString();
                        break;
                    }

                    case 18: {
                        if (position_ == null)
                        {
                            Position = new global::BBMessage.Types.Vector3();
                        }
                        input.ReadMessage(Position);
                        break;
                    }

                    case 26: {
                        if (rotation_ == null)
                        {
                            Rotation = new global::BBMessage.Types.Vector3();
                        }
                        input.ReadMessage(Rotation);
                        break;
                    }
                    }
                }
      #endif
            }
Example #4
0
            void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
            {
                uint tag;

                while ((tag = input.ReadTag()) != 0)
                {
                    switch (tag)
                    {
                    default:
                        _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
                        break;

                    case 10: {
                        Name = input.ReadString();
                        break;
                    }

                    case 18: {
                        if (position_ == null)
                        {
                            Position = new global::BBMessage.Types.Vector3();
                        }
                        input.ReadMessage(Position);
                        break;
                    }

                    case 26: {
                        if (rotation_ == null)
                        {
                            Rotation = new global::BBMessage.Types.Vector3();
                        }
                        input.ReadMessage(Rotation);
                        break;
                    }
                    }
                }
            }