SettingsCompiler.HDRAttribute.HDRColor C# (CSharp) Method

HDRColor() public static method

public static HDRColor ( FieldInfo field ) : bool
field System.Reflection.FieldInfo
return bool
        public static bool HDRColor(FieldInfo field)
        {
            HDRAttribute attr = field.GetCustomAttribute<HDRAttribute>();
            if(attr != null)
                return attr.HDR;
            else
                return false;
        }
    }

Usage Example

示例#1
0
 public ColorSetting(Color value, FieldInfo field, string group)
     : base(field, SettingType.Color, group)
 {
     Value = value;
     HDR   = HDRAttribute.HDRColor(field);
     MinValueAttribute.GetMinValue(field, ref MinValue);
     MaxValueAttribute.GetMaxValue(field, ref MaxValue);
     StepSizeAttribute.GetStepSize(field, ref StepSize);
 }