First commit on my server, yey!

This commit is contained in:
Sebastian Bularca
2026-03-19 18:12:07 +01:00
parent 5139ec2cec
commit fedd1961a0
602 changed files with 101587 additions and 6 deletions

View File

@@ -0,0 +1,37 @@
using Nox.Input;
using Nox.Platform;
namespace Nox.Core {
/// <summary>
/// Base class used by the platform factory to select the current platform and the input
/// </summary>
public class PlatformSelector {
public readonly DevicePlatform devicePlatform;
private InputMode inputMode;
public PlatformSelector(DevicePlatform devicePlatform, InputMode inputMode) {
this.devicePlatform = devicePlatform;
this.inputMode = inputMode;
}
public void SetInputMode(InputMode newInputMode) {
inputMode = newInputMode;
}
public static InputMode GetPlatformDefaultInputMode() {
#if UNITY_EDITOR
return InputMode.Editor;
#else
return InputMode.Desktop;
#endif
}
public static DevicePlatform GetDevicePlatform() {
#if UNITY_EDITOR
return DevicePlatform.UnityEditor;
#else
return DevicePlatform.Desktop;
#endif
}
}
}