源战役客户端
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

34 wiersze
1.6 KiB

4 tygodni temu
  1. SystemRuntimePlatform = SystemRuntimePlatform or {}
  2. SystemRuntimePlatform.Android = 1
  3. SystemRuntimePlatform.Iphone = 2
  4. SystemRuntimePlatform.Windows = 3
  5. SystemRuntimePlatform.WindowsEditor = 4
  6. SystemRuntimePlatform.Cur = 1
  7. function SystemRuntimePlatform.Init()
  8. if ApplicationPlatform == RuntimePlatform.Android or tostring(ApplicationPlatform) == tostring(RuntimePlatform.Android) then
  9. SystemRuntimePlatform.Cur = SystemRuntimePlatform.Android
  10. elseif ApplicationPlatform == RuntimePlatform.IPhonePlayer or tostring(ApplicationPlatform) == tostring(RuntimePlatform.IPhonePlayer) then
  11. SystemRuntimePlatform.Cur = SystemRuntimePlatform.Iphone
  12. elseif ApplicationPlatform == RuntimePlatform.WindowsEditor or tostring(ApplicationPlatform) == tostring(RuntimePlatform.WindowsEditor) then
  13. SystemRuntimePlatform.Cur = SystemRuntimePlatform.WindowsEditor
  14. elseif ApplicationPlatform == RuntimePlatform.WindowsPlayer or tostring(ApplicationPlatform) == tostring(RuntimePlatform.WindowsPlayer) then
  15. SystemRuntimePlatform.Cur = SystemRuntimePlatform.Windows
  16. end
  17. end
  18. function SystemRuntimePlatform.IsAndroid()
  19. return SystemRuntimePlatform.Cur == SystemRuntimePlatform.Android
  20. end
  21. function SystemRuntimePlatform.IsIphone()
  22. return SystemRuntimePlatform.Cur == SystemRuntimePlatform.Iphone
  23. end
  24. function SystemRuntimePlatform.IsWindows()
  25. return SystemRuntimePlatform.Cur == SystemRuntimePlatform.Windows or SystemRuntimePlatform.Cur == SystemRuntimePlatform.WindowsEditor
  26. end
  27. function SystemRuntimePlatform.IsWindowsEditor()
  28. return SystemRuntimePlatform.Cur == SystemRuntimePlatform.WindowsEditor
  29. end