|
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
|