源战役客户端
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.
 
 
 
 
 

35 lines
1.6 KiB

SystemRuntimePlatform = SystemRuntimePlatform or {}
SystemRuntimePlatform.Android = 1
SystemRuntimePlatform.Iphone = 2
SystemRuntimePlatform.Windows = 3
SystemRuntimePlatform.WindowsEditor = 4
SystemRuntimePlatform.Cur = 1
function SystemRuntimePlatform.Init()
if ApplicationPlatform == RuntimePlatform.Android or tostring(ApplicationPlatform) == tostring(RuntimePlatform.Android) then
SystemRuntimePlatform.Cur = SystemRuntimePlatform.Android
elseif ApplicationPlatform == RuntimePlatform.IPhonePlayer or tostring(ApplicationPlatform) == tostring(RuntimePlatform.IPhonePlayer) then
SystemRuntimePlatform.Cur = SystemRuntimePlatform.Iphone
elseif ApplicationPlatform == RuntimePlatform.WindowsEditor or tostring(ApplicationPlatform) == tostring(RuntimePlatform.WindowsEditor) then
SystemRuntimePlatform.Cur = SystemRuntimePlatform.WindowsEditor
elseif ApplicationPlatform == RuntimePlatform.WindowsPlayer or tostring(ApplicationPlatform) == tostring(RuntimePlatform.WindowsPlayer) then
SystemRuntimePlatform.Cur = SystemRuntimePlatform.Windows
end
end
function SystemRuntimePlatform.IsAndroid()
return SystemRuntimePlatform.Cur == SystemRuntimePlatform.Android
end
function SystemRuntimePlatform.IsIphone()
return SystemRuntimePlatform.Cur == SystemRuntimePlatform.Iphone
end
function SystemRuntimePlatform.IsWindows()
return SystemRuntimePlatform.Cur == SystemRuntimePlatform.Windows or SystemRuntimePlatform.Cur == SystemRuntimePlatform.WindowsEditor
end
function SystemRuntimePlatform.IsWindowsEditor()
return SystemRuntimePlatform.Cur == SystemRuntimePlatform.WindowsEditor
end