Exemple #1
0
    public static void FromHex(string hex)
    {
        int bitmask;

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