rise-and-swine/Assets/Scripts/Assembly-CSharp/DeviceInfo.cs
2023-02-25 23:04:03 -05:00

40 lines
777 B
C#

using UnityEngine;
public class DeviceInfo
{
public static bool UsesTouchInput
{
get
{
RuntimePlatform runtimePlatform = Application.platform;
return runtimePlatform == RuntimePlatform.IPhonePlayer || runtimePlatform == RuntimePlatform.Android;
}
}
public static DeviceFamily ActiveDeviceFamily
{
get
{
return DeviceInfo.DeviceFamily.Android;
}
}
public static bool IsDesktop
{
get
{
RuntimePlatform runtimePlatform = Application.platform;
return runtimePlatform == RuntimePlatform.OSXEditor || runtimePlatform == RuntimePlatform.OSXPlayer || runtimePlatform == RuntimePlatform.WindowsPlayer || runtimePlatform == RuntimePlatform.WindowsEditor;
}
}
public enum DeviceFamily
{
Ios,
Android,
Pc,
Osx,
BB10,
WP8
}
}