コード例 #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    Id = input.ReadInt32();
                    break;
                }

                case 16: {
                    Count = input.ReadUInt32();
                    break;
                }

                case 26: {
                    if (binaryMeta_ == null)
                    {
                        binaryMeta_ = new global::Org.Dragonet.Cloudland.Net.Protocol.SerializedMetadata();
                    }
                    input.ReadMessage(binaryMeta_);
                    break;
                }
                }
            }
        }
コード例 #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    EntityId = input.ReadUInt64();
                    break;
                }

                case 16: {
                    entityType_ = (global::Org.Dragonet.Cloudland.Net.Protocol.EntityType)input.ReadEnum();
                    break;
                }

                case 25: {
                    X = input.ReadDouble();
                    break;
                }

                case 33: {
                    Y = input.ReadDouble();
                    break;
                }

                case 41: {
                    Z = input.ReadDouble();
                    break;
                }

                case 53: {
                    Yaw = input.ReadFloat();
                    break;
                }

                case 61: {
                    Pitch = input.ReadFloat();
                    break;
                }

                case 66: {
                    if (meta_ == null)
                    {
                        meta_ = new global::Org.Dragonet.Cloudland.Net.Protocol.SerializedMetadata();
                    }
                    input.ReadMessage(meta_);
                    break;
                }
                }
            }
        }
コード例 #3
0
 public void MergeFrom(ServerEntityUpdateMessage other)
 {
     if (other == null)
     {
         return;
     }
     if (other.EntityId != 0UL)
     {
         EntityId = other.EntityId;
     }
     if (other.FlagPosition != false)
     {
         FlagPosition = other.FlagPosition;
     }
     if (other.X != 0D)
     {
         X = other.X;
     }
     if (other.Y != 0D)
     {
         Y = other.Y;
     }
     if (other.Z != 0D)
     {
         Z = other.Z;
     }
     if (other.FlagRotation != false)
     {
         FlagRotation = other.FlagRotation;
     }
     if (other.Yaw != 0F)
     {
         Yaw = other.Yaw;
     }
     if (other.Pitch != 0F)
     {
         Pitch = other.Pitch;
     }
     if (other.FlagMeta != false)
     {
         FlagMeta = other.FlagMeta;
     }
     if (other.meta_ != null)
     {
         if (meta_ == null)
         {
             meta_ = new global::Org.Dragonet.Cloudland.Net.Protocol.SerializedMetadata();
         }
         Meta.MergeFrom(other.Meta);
     }
 }
コード例 #4
0
 public void MergeFrom(ServerAddEntityMessage other)
 {
     if (other == null)
     {
         return;
     }
     if (other.EntityId != 0UL)
     {
         EntityId = other.EntityId;
     }
     if (other.EntityType != 0)
     {
         EntityType = other.EntityType;
     }
     if (other.X != 0D)
     {
         X = other.X;
     }
     if (other.Y != 0D)
     {
         Y = other.Y;
     }
     if (other.Z != 0D)
     {
         Z = other.Z;
     }
     if (other.Yaw != 0F)
     {
         Yaw = other.Yaw;
     }
     if (other.Pitch != 0F)
     {
         Pitch = other.Pitch;
     }
     if (other.meta_ != null)
     {
         if (meta_ == null)
         {
             meta_ = new global::Org.Dragonet.Cloudland.Net.Protocol.SerializedMetadata();
         }
         Meta.MergeFrom(other.Meta);
     }
 }
コード例 #5
0
 public void MergeFrom(SerializedItem other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0)
     {
         Id = other.Id;
     }
     if (other.Count != 0)
     {
         Count = other.Count;
     }
     if (other.binaryMeta_ != null)
     {
         if (binaryMeta_ == null)
         {
             binaryMeta_ = new global::Org.Dragonet.Cloudland.Net.Protocol.SerializedMetadata();
         }
         BinaryMeta.MergeFrom(other.BinaryMeta);
     }
 }
コード例 #6
0
                public void MergeFrom(pb::CodedInputStream input)
                {
                    uint tag;

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

                        case 8: {
                            type_ = (global::Org.Dragonet.Cloudland.Net.Protocol.SerializedMetadata.Types.MetadataEntry.Types.DataType)input.ReadEnum();
                            break;
                        }

                        case 16: {
                            Int32Value = input.ReadInt32();
                            break;
                        }

                        case 24: {
                            Int64Value = input.ReadInt64();
                            break;
                        }

                        case 37: {
                            FloatValue = input.ReadFloat();
                            break;
                        }

                        case 41: {
                            DoubleValue = input.ReadDouble();
                            break;
                        }

                        case 48: {
                            BooleanValue = input.ReadBool();
                            break;
                        }

                        case 58: {
                            StringValue = input.ReadString();
                            break;
                        }

                        case 66: {
                            BytesValue = input.ReadBytes();
                            break;
                        }

                        case 74: {
                            global::Org.Dragonet.Cloudland.Net.Protocol.SerializedMetadata subBuilder = new global::Org.Dragonet.Cloudland.Net.Protocol.SerializedMetadata();
                            if (valueCase_ == ValueOneofCase.MetaValue)
                            {
                                subBuilder.MergeFrom(MetaValue);
                            }
                            input.ReadMessage(subBuilder);
                            MetaValue = subBuilder;
                            break;
                        }
                        }
                    }
                }