예제 #1
0
        internal void Write(Writer writer)
        {
            switch (Type)
            {
            case AttributeTypes.UINT8:
                writer.Write(value_uint8);
                break;

            case AttributeTypes.UINT16:
                writer.Write(value_uint16);
                break;

            case AttributeTypes.UINT32:
                writer.Write(value_uint32);
                break;

            case AttributeTypes.INT8:
                writer.Write(value_int8);
                break;

            case AttributeTypes.INT16:
                writer.Write(value_int16);
                break;

            case AttributeTypes.INT32:
                writer.Write(value_int32);
                break;

            case AttributeTypes.ENUM:
                writer.Write(value_enum);
                break;

            case AttributeTypes.BOOL:
                writer.Write((uint)(value_bool ? 1 : 0));
                break;

            case AttributeTypes.STRING:
                writer.WriteRSDKUnicodeString(value_string);
                break;

            case AttributeTypes.VECTOR2:
                value_vector2.Write(writer);
                break;

            case AttributeTypes.VECTOR3:
                value_vector2.Write(writer, true);
                break;

            case AttributeTypes.COLOR:
                value_color.Write(writer);
                break;
            }
        }
예제 #2
0
        internal void Write(Writer writer)
        {
            switch (Type)
            {
            case AttributeTypes.UINT8:
                writer.Write(value_uint8);
                break;

            case AttributeTypes.UINT16:
                writer.Write(value_uint16);
                break;

            case AttributeTypes.UINT32:
                writer.Write(value_uint32);
                break;

            case AttributeTypes.INT8:
                writer.Write(value_int8);
                break;

            case AttributeTypes.INT16:
                writer.Write(value_int16);
                break;

            case AttributeTypes.INT32:
                writer.Write(value_int32);
                break;

            case AttributeTypes.VAR:
                writer.Write(value_var);
                break;

            case AttributeTypes.BOOL:
                writer.Write((uint)(value_bool ? 1 : 0));
                break;

            case AttributeTypes.STRING:
                writer.WriteRSDKUnicodeString(value_string);
                break;

            case AttributeTypes.POSITION:
                value_position.Write(writer);
                break;

            case AttributeTypes.COLOR:
                value_color.Write(writer);
                break;
            }
        }