EnumUtil.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace SC.XR.Unity.Module_PlatformAccount
  5. {
  6. public class EnumUtil
  7. {
  8. public static bool IsSelected(APLoginFormsProperties config, APLoginFormsProperties type)
  9. {
  10. int index = 1 << (int)type;
  11. int typeResult = (int)config;
  12. if ((typeResult & index) == index)
  13. {
  14. return true;
  15. }
  16. return false;
  17. }
  18. public static bool IsSelected(CustomColorProperties config, CustomColorProperties type)
  19. {
  20. int index = 1 << (int)type;
  21. int typeResult = (int)config;
  22. if ((typeResult & index) == index)
  23. {
  24. return true;
  25. }
  26. return false;
  27. }
  28. public static bool IsSelected(InputFieldFormsProperties config, InputFieldFormsProperties type)
  29. {
  30. int index = 1 << (int)type;
  31. int typeResult = (int)config;
  32. if ((typeResult & index) == index)
  33. {
  34. return true;
  35. }
  36. return false;
  37. }
  38. }
  39. }