CSharpTest.cs 675 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Godot;
  2. public partial class CSharpTest : Node
  3. {
  4. public string OperatingSystem()
  5. {
  6. #if GODOT_WINDOWS
  7. return "Windows";
  8. #elif GODOT_LINUXBSD
  9. return "Linux/*BSD";
  10. #elif GODOT_MACOS
  11. return "macOS";
  12. #elif GODOT_ANDROID
  13. return "Android";
  14. #elif GODOT_IOS
  15. return "iOS";
  16. #elif GODOT_WEB
  17. return "Web";
  18. #elif GODOT
  19. return "Other";
  20. #else
  21. return "Unknown";
  22. #endif
  23. }
  24. public string PlatformType()
  25. {
  26. #if GODOT_PC
  27. return "PC";
  28. #elif GODOT_MOBILE
  29. return "Mobile";
  30. #elif GODOT_WEB
  31. return "Web";
  32. #elif GODOT
  33. return "Other";
  34. #else
  35. return "Unknown";
  36. #endif
  37. }
  38. }