void Test(JustAnEnum color) { // Debug.Log("Testing " + color); // if ((color & JustAnEnum.RedOrBlue) == color) Debug.Log("It's Red or Blue"); // if ((color & JustAnEnum.RedOrBlue) == JustAnEnum.None) Debug.Log("It's not Red or Blue"); // if ((color & JustAnEnum.Yellow) == JustAnEnum.None) Debug.Log("It's not Yellow"); // if ((color & JustAnEnum.All) == color) Debug.Log("It's definitely something"); // Debug.Log("-----------------"); }
void Test(JustAnEnum color) { // Debug.Log("Testing " + color); // if ((color & JustAnEnum.RedOrBlue) == color) Debug.Log("It's Red or Blue"); // if ((color & JustAnEnum.RedOrBlue) == JustAnEnum.None) Debug.Log("It's not Red or Blue"); // if ((color & JustAnEnum.Yellow) == JustAnEnum.None) Debug.Log("It's not Yellow"); // if ((color & JustAnEnum.All) == color) Debug.Log("It's definitely something"); // Debug.Log("-----------------"); }