internal void Read(Reader reader) { switch (Type) { case AttributeTypes.UINT8: value_uint8 = reader.ReadByte(); break; case AttributeTypes.UINT16: value_uint16 = reader.ReadUInt16(); break; case AttributeTypes.UINT32: value_uint32 = reader.ReadUInt32(); break; case AttributeTypes.INT8: value_int8 = reader.ReadSByte(); break; case AttributeTypes.INT16: value_int16 = reader.ReadInt16(); break; case AttributeTypes.INT32: value_int32 = reader.ReadInt32(); break; case AttributeTypes.ENUM: value_enum = reader.ReadInt32(); break; case AttributeTypes.BOOL: value_bool = reader.ReadUInt32() != 0; break; case AttributeTypes.STRING: value_string = reader.ReadRSDKUnicodeString(); break; case AttributeTypes.VECTOR2: value_vector2 = new Position(reader); break; case AttributeTypes.VECTOR3: value_vector2 = new Position(reader); break; case AttributeTypes.COLOR: value_color = new Color(reader); break; } }