示例#1
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: {
                    if (position_ == null)
                    {
                        Position = new global::Ubii.DataStructure.Vector3();
                    }
                    input.ReadMessage(Position);
                    break;
                }

                case 18: {
                    global::Ubii.DataStructure.Quaternion subBuilder = new global::Ubii.DataStructure.Quaternion();
                    if (orientationCase_ == OrientationOneofCase.Quaternion)
                    {
                        subBuilder.MergeFrom(Quaternion);
                    }
                    input.ReadMessage(subBuilder);
                    Quaternion = subBuilder;
                    break;
                }

                case 26: {
                    global::Ubii.DataStructure.Vector3 subBuilder = new global::Ubii.DataStructure.Vector3();
                    if (orientationCase_ == OrientationOneofCase.Euler)
                    {
                        subBuilder.MergeFrom(Euler);
                    }
                    input.ReadMessage(subBuilder);
                    Euler = subBuilder;
                    break;
                }
                }
            }
        }
示例#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: {
                    Topic = input.ReadString();
                    break;
                }

                case 17: {
                    Number = input.ReadDouble();
                    break;
                }

                case 24: {
                    Boolean = input.ReadBool();
                    break;
                }

                case 34: {
                    String = input.ReadString();
                    break;
                }

                case 42: {
                    global::Ubii.DataStructure.Vector2 subBuilder = new global::Ubii.DataStructure.Vector2();
                    if (typeCase_ == TypeOneofCase.Vector2)
                    {
                        subBuilder.MergeFrom(Vector2);
                    }
                    input.ReadMessage(subBuilder);
                    Vector2 = subBuilder;
                    break;
                }

                case 50: {
                    global::Ubii.DataStructure.Vector3 subBuilder = new global::Ubii.DataStructure.Vector3();
                    if (typeCase_ == TypeOneofCase.Vector3)
                    {
                        subBuilder.MergeFrom(Vector3);
                    }
                    input.ReadMessage(subBuilder);
                    Vector3 = subBuilder;
                    break;
                }

                case 58: {
                    global::Ubii.DataStructure.Vector4 subBuilder = new global::Ubii.DataStructure.Vector4();
                    if (typeCase_ == TypeOneofCase.Vector4)
                    {
                        subBuilder.MergeFrom(Vector4);
                    }
                    input.ReadMessage(subBuilder);
                    Vector4 = subBuilder;
                    break;
                }

                case 66: {
                    global::Ubii.DataStructure.Quaternion subBuilder = new global::Ubii.DataStructure.Quaternion();
                    if (typeCase_ == TypeOneofCase.Quaternion)
                    {
                        subBuilder.MergeFrom(Quaternion);
                    }
                    input.ReadMessage(subBuilder);
                    Quaternion = subBuilder;
                    break;
                }

                case 74: {
                    global::Ubii.DataStructure.Matrix3x2 subBuilder = new global::Ubii.DataStructure.Matrix3x2();
                    if (typeCase_ == TypeOneofCase.Matrix3X2)
                    {
                        subBuilder.MergeFrom(Matrix3X2);
                    }
                    input.ReadMessage(subBuilder);
                    Matrix3X2 = subBuilder;
                    break;
                }

                case 82: {
                    global::Ubii.DataStructure.Matrix4x4 subBuilder = new global::Ubii.DataStructure.Matrix4x4();
                    if (typeCase_ == TypeOneofCase.Matrix4X4)
                    {
                        subBuilder.MergeFrom(Matrix4X4);
                    }
                    input.ReadMessage(subBuilder);
                    Matrix4X4 = subBuilder;
                    break;
                }

                case 90: {
                    global::Ubii.DataStructure.Color subBuilder = new global::Ubii.DataStructure.Color();
                    if (typeCase_ == TypeOneofCase.Color)
                    {
                        subBuilder.MergeFrom(Color);
                    }
                    input.ReadMessage(subBuilder);
                    Color = subBuilder;
                    break;
                }
                }
            }
        }