public static void FromHex(string hex) { int bitmask; if (Int32.TryParse(hex, NumberStyles.HexNumber, CultureInfo.InvariantCulture, out bitmask)) { _flags = (NoiseFlags)bitmask; } }
public static void Set(NoiseFlags mask, bool val) { if (val) { _flags |= mask; } else { _flags &= ~mask; } }
public static bool Get(NoiseFlags mask) { return(_flags.HasFlag(mask)); }