源战役客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.6 KiB

преди 4 седмици
  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