CSharpTest.cs 861 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 || GODOT_X11
  9. return "Linux (or BSD)";
  10. #elif GODOT_SERVER
  11. return "Server (Linux or BSD)";
  12. #elif GODOT_MACOS || GODOT_OSX
  13. return "macOS";
  14. #elif GODOT_ANDROID
  15. return "Android";
  16. #elif GODOT_IOS
  17. return "iOS";
  18. #elif GODOT_HTML5
  19. return "HTML5";
  20. #elif GODOT_HAIKU
  21. return "Haiku";
  22. #elif GODOT_UWP
  23. return "UWP (Windows 10)";
  24. #elif GODOT
  25. return "Other";
  26. #else
  27. return "Unknown";
  28. #endif
  29. }
  30. public string PlatformType()
  31. {
  32. #if GODOT_PC
  33. return "PC";
  34. #elif GODOT_MOBILE
  35. return "Mobile";
  36. #elif GODOT_WEB
  37. return "Web";
  38. #elif GODOT
  39. return "Other";
  40. #else
  41. return "Unknown";
  42. #endif
  43. }
  44. }