diff --git a/Assets/AddressableAssetsData/AddressableAssetSettings.asset b/Assets/AddressableAssetsData/AddressableAssetSettings.asset index 95c07cc..6852236 100644 --- a/Assets/AddressableAssetsData/AddressableAssetSettings.asset +++ b/Assets/AddressableAssetsData/AddressableAssetSettings.asset @@ -15,7 +15,7 @@ MonoBehaviour: m_DefaultGroup: 64326db70156abe409df70a80bc62dc5 m_currentHash: serializedVersion: 2 - Hash: 00000000000000000000000000000000 + Hash: 7161750430d6352c24e2b9d942610a3e m_OptimizeCatalogSize: 0 m_BuildRemoteCatalog: 0 m_CatalogRequestsTimeout: 0 diff --git a/Assets/RebootKit b/Assets/RebootKit index 00b33af..40e2236 160000 --- a/Assets/RebootKit +++ b/Assets/RebootKit @@ -1 +1 @@ -Subproject commit 00b33af98b6181b3984c0ca7f9973cd740250933 +Subproject commit 40e2236f121e454e7dcc48b675b59384efdb07ed diff --git a/Assets/jelycho/Code/Main/GameConsts.cs b/Assets/jelycho/Code/Main/GameConsts.cs index 90114e5..7eaff3c 100755 --- a/Assets/jelycho/Code/Main/GameConsts.cs +++ b/Assets/jelycho/Code/Main/GameConsts.cs @@ -2,5 +2,7 @@ public static class GameConsts { public const string k_AddComponentMenu = "Jelycho/"; public const string k_CreateAssetMenu = "Jelycho/"; + + public const string k_FPPActionMapName = "FPP"; } } \ No newline at end of file diff --git a/Assets/jelycho/Code/Player/PlayerController.cs b/Assets/jelycho/Code/Player/PlayerController.cs index 65babde..ddce4dd 100755 --- a/Assets/jelycho/Code/Player/PlayerController.cs +++ b/Assets/jelycho/Code/Player/PlayerController.cs @@ -1,9 +1,11 @@ using System; using RebootKit.Engine.Extensions; using RebootKit.Engine.Foundation; +using RebootKit.Engine.Input; using RebootKit.Engine.Main; using RebootKit.Engine.Network; using RebootKit.Engine.Simulation; +using RebootReality.jelycho.Main; using RebootReality.jelycho.Player.HUD; using Unity.Mathematics; using UnityEngine; @@ -18,16 +20,24 @@ namespace RebootReality.jelycho.Player { PlayerActor m_Actor; PlayerHUD m_HUD; + + InputState m_InputState; IDisposable m_TargetInteractableLabelDisposable; - IInteractable m_Interactable; void Awake() { m_HUD = Instantiate(m_Config.playerHUDPrefab); + m_InputState = RR.Input.NewInputState("Player Controller"); + m_InputState.HideCursor = true; + m_InputState.LockCursor = true; + m_InputState.AddActiveMap(GameConsts.k_FPPActionMapName); } void OnDestroy() { + m_InputState?.Dispose(); + m_InputState = null; + if (m_HUD != null) { Destroy(m_HUD.gameObject); m_HUD = null; @@ -39,12 +49,12 @@ namespace RebootReality.jelycho.Player { } void OnEnable() { - RR.Input.LockCursor(); + m_InputState.IsActive = true; RR.Input.EnableControls(); } void OnDisable() { - RR.Input.UnlockCursor(); + m_InputState.IsActive = false; RR.Input.DisableControls(); }