Ejemplo n.º 1
0
 public void MergeFrom(Object2D other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.pose_ != null)
     {
         if (pose_ == null)
         {
             pose_ = new global::Ubii.DataStructure.Pose2D();
         }
         Pose.MergeFrom(other.Pose);
     }
     if (other.size_ != null)
     {
         if (size_ == null)
         {
             size_ = new global::Ubii.DataStructure.Vector2();
         }
         Size.MergeFrom(other.Size);
     }
     if (other.UserDataJson.Length != 0)
     {
         UserDataJson = other.UserDataJson;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 2
0
        public void MergeFrom(Pose2D other)
        {
            if (other == null)
            {
                return;
            }
            if (other.position_ != null)
            {
                if (position_ == null)
                {
                    position_ = new global::Ubii.DataStructure.Vector2();
                }
                Position.MergeFrom(other.Position);
            }
            switch (other.OrientationCase)
            {
            case OrientationOneofCase.Direction:
                if (Direction == null)
                {
                    Direction = new global::Ubii.DataStructure.Vector2();
                }
                Direction.MergeFrom(other.Direction);
                break;

            case OrientationOneofCase.Angle:
                Angle = other.Angle;
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
Ejemplo n.º 3
0
 public void MergeFrom(TouchEvent other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     if (other.position_ != null)
     {
         if (position_ == null)
         {
             position_ = new global::Ubii.DataStructure.Vector2();
         }
         Position.MergeFrom(other.Position);
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.Force != 0F)
     {
         Force = other.Force;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 4
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 8: {
                    type_ = (global::Ubii.DataStructure.ButtonEventType)input.ReadEnum();
                    break;
                }

                case 18: {
                    if (position_ == null)
                    {
                        position_ = new global::Ubii.DataStructure.Vector2();
                    }
                    input.ReadMessage(position_);
                    break;
                }
                }
            }
        }
Ejemplo n.º 5
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: {
                    Id = input.ReadString();
                    break;
                }

                case 18: {
                    if (pose_ == null)
                    {
                        pose_ = new global::Ubii.DataStructure.Pose2D();
                    }
                    input.ReadMessage(pose_);
                    break;
                }

                case 26: {
                    if (size_ == null)
                    {
                        size_ = new global::Ubii.DataStructure.Vector2();
                    }
                    input.ReadMessage(size_);
                    break;
                }

                case 34: {
                    UserDataJson = input.ReadString();
                    break;
                }
                }
            }
        }
Ejemplo n.º 6
0
 public void MergeFrom(TouchEvent other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Type != global::Ubii.DataStructure.ButtonEventType.Up)
     {
         Type = other.Type;
     }
     if (other.position_ != null)
     {
         if (position_ == null)
         {
             Position = new global::Ubii.DataStructure.Vector2();
         }
         Position.MergeFrom(other.Position);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 7
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.Vector2();
                    }
                    input.ReadMessage(position_);
                    break;
                }

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

                case 29: {
                    Angle = input.ReadFloat();
                    break;
                }
                }
            }
        }
Ejemplo n.º 8
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;
                }
                }
            }
        }
Ejemplo n.º 9
0
        public void MergeFrom(TopicDataRecord other)
        {
            if (other == null)
            {
                return;
            }
            if (other.Topic.Length != 0)
            {
                Topic = other.Topic;
            }
            switch (other.TypeCase)
            {
            case TypeOneofCase.Number:
                Number = other.Number;
                break;

            case TypeOneofCase.Boolean:
                Boolean = other.Boolean;
                break;

            case TypeOneofCase.String:
                String = other.String;
                break;

            case TypeOneofCase.Vector2:
                if (Vector2 == null)
                {
                    Vector2 = new global::Ubii.DataStructure.Vector2();
                }
                Vector2.MergeFrom(other.Vector2);
                break;

            case TypeOneofCase.Vector3:
                if (Vector3 == null)
                {
                    Vector3 = new global::Ubii.DataStructure.Vector3();
                }
                Vector3.MergeFrom(other.Vector3);
                break;

            case TypeOneofCase.Vector4:
                if (Vector4 == null)
                {
                    Vector4 = new global::Ubii.DataStructure.Vector4();
                }
                Vector4.MergeFrom(other.Vector4);
                break;

            case TypeOneofCase.Quaternion:
                if (Quaternion == null)
                {
                    Quaternion = new global::Ubii.DataStructure.Quaternion();
                }
                Quaternion.MergeFrom(other.Quaternion);
                break;

            case TypeOneofCase.Matrix3X2:
                if (Matrix3X2 == null)
                {
                    Matrix3X2 = new global::Ubii.DataStructure.Matrix3x2();
                }
                Matrix3X2.MergeFrom(other.Matrix3X2);
                break;

            case TypeOneofCase.Matrix4X4:
                if (Matrix4X4 == null)
                {
                    Matrix4X4 = new global::Ubii.DataStructure.Matrix4x4();
                }
                Matrix4X4.MergeFrom(other.Matrix4X4);
                break;

            case TypeOneofCase.Color:
                if (Color == null)
                {
                    Color = new global::Ubii.DataStructure.Color();
                }
                Color.MergeFrom(other.Color);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }