forked from Shardstone/trail-into-darkness
First commit on my server, yey!
This commit is contained in:
27
Assets/Code/Input/DesktopInput.cs
Normal file
27
Assets/Code/Input/DesktopInput.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using Nox.Platform;
|
||||
|
||||
namespace Nox.Input {
|
||||
public class DesktopInput : IInput {
|
||||
private readonly PlatformSettings platformSettings;
|
||||
|
||||
public DesktopInput(PlatformSettings platformSettings) {
|
||||
this.platformSettings = platformSettings;
|
||||
}
|
||||
|
||||
public void Initialize() {
|
||||
SetupInput();
|
||||
}
|
||||
|
||||
private void SetupInput() {
|
||||
platformSettings.inputSettings.inputActions = new InputSystem_Actions();
|
||||
platformSettings.inputSettings.inputActions.Enable();
|
||||
}
|
||||
|
||||
public void Tick() { }
|
||||
|
||||
public void Dispose() {
|
||||
platformSettings.inputSettings.inputActions.Disable();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
2
Assets/Code/Input/DesktopInput.cs.meta
Normal file
2
Assets/Code/Input/DesktopInput.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c53aaaa29bf2e4487b7d60b25cef8852
|
||||
7
Assets/Code/Input/DesktopInputSettings.cs
Normal file
7
Assets/Code/Input/DesktopInputSettings.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Nox.Input {
|
||||
[CreateAssetMenu(fileName = "DesktopInputSettings", menuName = "Nox/Database/Input/DesktopInputSettings")]
|
||||
public class DesktopInputSettings : InputSettings {
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Input/DesktopInputSettings.cs.meta
Normal file
2
Assets/Code/Input/DesktopInputSettings.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ecb9b792fe69a479e99e8cc8603384fb
|
||||
17
Assets/Code/Input/EditorInput.cs
Normal file
17
Assets/Code/Input/EditorInput.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Nox.Platform;
|
||||
|
||||
namespace Nox.Input {
|
||||
public class EditorInput : IInput {
|
||||
private readonly PlatformSettings platformSettings;
|
||||
|
||||
public EditorInput(PlatformSettings platformSettings) {
|
||||
this.platformSettings = platformSettings;
|
||||
}
|
||||
public void Initialize() {
|
||||
platformSettings.inputSettings.inputActions = new InputSystem_Actions();
|
||||
platformSettings.inputSettings.inputActions.Enable();
|
||||
}
|
||||
public void Tick() { }
|
||||
public void Dispose() { }
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Input/EditorInput.cs.meta
Normal file
2
Assets/Code/Input/EditorInput.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 281ee0063f3504b618326a081abfa698
|
||||
7
Assets/Code/Input/EditorInputSettings.cs
Normal file
7
Assets/Code/Input/EditorInputSettings.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Nox.Input {
|
||||
[CreateAssetMenu(fileName = "EditorInputSettings", menuName = "Nox/Database/Input/EditorInputSettings")]
|
||||
public class EditorInputSettings : InputSettings {
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Input/EditorInputSettings.cs.meta
Normal file
2
Assets/Code/Input/EditorInputSettings.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1ab8976c2d688464da5283961853fc8a
|
||||
7
Assets/Code/Input/IInput.cs
Normal file
7
Assets/Code/Input/IInput.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace Nox.Input {
|
||||
public interface IInput {
|
||||
void Initialize();
|
||||
void Tick();
|
||||
void Dispose();
|
||||
}
|
||||
}
|
||||
3
Assets/Code/Input/IInput.cs.meta
Normal file
3
Assets/Code/Input/IInput.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 70bf93df18b346daa019505f5360777f
|
||||
timeCreated: 1771155387
|
||||
13
Assets/Code/Input/Input.cs
Normal file
13
Assets/Code/Input/Input.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
namespace Nox.Input {
|
||||
public enum InputMode {
|
||||
None = 0,
|
||||
Desktop = 1,
|
||||
Editor = 100
|
||||
}
|
||||
|
||||
public enum ControllerHand {
|
||||
None = 0,
|
||||
Right = 1,
|
||||
Left = 2,
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Input/Input.cs.meta
Normal file
2
Assets/Code/Input/Input.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 20ffba6f41c0140dfba203a5f37aed7b
|
||||
8
Assets/Code/Input/InputSettings.cs
Normal file
8
Assets/Code/Input/InputSettings.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Nox.Input {
|
||||
public abstract class InputSettings : ScriptableObject {
|
||||
public InputMode inputMode;
|
||||
public InputSystem_Actions inputActions;
|
||||
}
|
||||
}
|
||||
2
Assets/Code/Input/InputSettings.cs.meta
Normal file
2
Assets/Code/Input/InputSettings.cs.meta
Normal file
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 949429364244341c4b9f5afa0420ad02
|
||||
Reference in New Issue
Block a user