From 87e737f1b1118d0a3a0d8f5ab7aa933ffdb543d8 Mon Sep 17 00:00:00 2001
From: Nat10k <110515021+Nat10k@users.noreply.github.com>
Date: Fri, 10 May 2024 02:22:49 +0700
Subject: [PATCH] fix : refactor inputs to new input system

---
 Assets/Inputs/ControlRef.cs                   |   6 +
 Assets/Inputs/ControlRef.cs.meta              |  11 +
 Assets/Inputs/Controls.cs                     |  30 ++
 Assets/Inputs/Controls.inputactions           |  20 +
 Assets/Scenes/Main.unity                      | 365 ++++++------------
 Assets/Scenes/Menu.unity                      |   2 +-
 Assets/Scenes/Shop.unity                      | 116 ------
 Assets/Scripts/Managers/CheatManager.cs       |   9 +-
 .../Scripts/Managers/CinematicController.cs   |  15 +-
 Assets/Scripts/Managers/DialogueManager.cs    |   8 +-
 Assets/Scripts/Managers/PauseManager.cs       |  15 +-
 Assets/Scripts/Managers/QuestManager.cs       |  11 +-
 Assets/Scripts/Managers/SettingsManager.cs    |   1 +
 Assets/Scripts/Player/PlayerPetSpawner.cs     |   7 +-
 Assets/ShopManager.cs                         |  10 +-
 15 files changed, 203 insertions(+), 423 deletions(-)
 create mode 100644 Assets/Inputs/ControlRef.cs
 create mode 100644 Assets/Inputs/ControlRef.cs.meta

diff --git a/Assets/Inputs/ControlRef.cs b/Assets/Inputs/ControlRef.cs
new file mode 100644
index 0000000..37be1cb
--- /dev/null
+++ b/Assets/Inputs/ControlRef.cs
@@ -0,0 +1,6 @@
+using UnityEngine;
+
+public class ControlRef : MonoBehaviour
+{
+    public static Controls control = new Controls();
+}
\ No newline at end of file
diff --git a/Assets/Inputs/ControlRef.cs.meta b/Assets/Inputs/ControlRef.cs.meta
new file mode 100644
index 0000000..890fe25
--- /dev/null
+++ b/Assets/Inputs/ControlRef.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4da950bbe1b979b43abb0b81b557db7f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 
diff --git a/Assets/Inputs/Controls.cs b/Assets/Inputs/Controls.cs
index b9b4ef0..1ef3dd8 100644
--- a/Assets/Inputs/Controls.cs
+++ b/Assets/Inputs/Controls.cs
@@ -89,6 +89,15 @@ public partial class @Controls: IInputActionCollection2, IDisposable
                     ""processors"": """",
                     ""interactions"": """",
                     ""initialStateCheck"": true
+                },
+                {
+                    ""name"": ""Shop"",
+                    ""type"": ""Button"",
+                    ""id"": ""56c20ab6-5f48-4039-9aad-b647a614abf0"",
+                    ""expectedControlType"": ""Button"",
+                    ""processors"": """",
+                    ""interactions"": """",
+                    ""initialStateCheck"": false
                 }
             ],
             ""bindings"": [
@@ -355,6 +364,17 @@ public partial class @Controls: IInputActionCollection2, IDisposable
                     ""action"": ""Scroll"",
                     ""isComposite"": false,
                     ""isPartOfComposite"": false
+                },
+                {
+                    ""name"": """",
+                    ""id"": ""138f3252-18be-4009-be6e-76a4acbe357b"",
+                    ""path"": ""<Keyboard>/b"",
+                    ""interactions"": """",
+                    ""processors"": """",
+                    ""groups"": ""Keyboard&Mouse"",
+                    ""action"": ""Shop"",
+                    ""isComposite"": false,
+                    ""isPartOfComposite"": false
                 }
             ]
         },
@@ -967,6 +987,7 @@ public partial class @Controls: IInputActionCollection2, IDisposable
         m_Player_Cheat = m_Player.FindAction("Cheat", throwIfNotFound: true);
         m_Player_Grenade = m_Player.FindAction("Grenade", throwIfNotFound: true);
         m_Player_Scroll = m_Player.FindAction("Scroll", throwIfNotFound: true);
+        m_Player_Shop = m_Player.FindAction("Shop", throwIfNotFound: true);
         // UI
         m_UI = asset.FindActionMap("UI", throwIfNotFound: true);
         m_UI_Navigate = m_UI.FindAction("Navigate", throwIfNotFound: true);
@@ -1048,6 +1069,7 @@ public partial class @Controls: IInputActionCollection2, IDisposable
     private readonly InputAction m_Player_Cheat;
     private readonly InputAction m_Player_Grenade;
     private readonly InputAction m_Player_Scroll;
+    private readonly InputAction m_Player_Shop;
     public struct PlayerActions
     {
         private @Controls m_Wrapper;
@@ -1059,6 +1081,7 @@ public partial class @Controls: IInputActionCollection2, IDisposable
         public InputAction @Cheat => m_Wrapper.m_Player_Cheat;
         public InputAction @Grenade => m_Wrapper.m_Player_Grenade;
         public InputAction @Scroll => m_Wrapper.m_Player_Scroll;
+        public InputAction @Shop => m_Wrapper.m_Player_Shop;
         public InputActionMap Get() { return m_Wrapper.m_Player; }
         public void Enable() { Get().Enable(); }
         public void Disable() { Get().Disable(); }
@@ -1089,6 +1112,9 @@ public partial class @Controls: IInputActionCollection2, IDisposable
             @Scroll.started += instance.OnScroll;
             @Scroll.performed += instance.OnScroll;
             @Scroll.canceled += instance.OnScroll;
+            @Shop.started += instance.OnShop;
+            @Shop.performed += instance.OnShop;
+            @Shop.canceled += instance.OnShop;
         }
 
         private void UnregisterCallbacks(IPlayerActions instance)
@@ -1114,6 +1140,9 @@ public partial class @Controls: IInputActionCollection2, IDisposable
             @Scroll.started -= instance.OnScroll;
             @Scroll.performed -= instance.OnScroll;
             @Scroll.canceled -= instance.OnScroll;
+            @Shop.started -= instance.OnShop;
+            @Shop.performed -= instance.OnShop;
+            @Shop.canceled -= instance.OnShop;
         }
 
         public void RemoveCallbacks(IPlayerActions instance)
@@ -1311,6 +1340,7 @@ public partial class @Controls: IInputActionCollection2, IDisposable
         void OnCheat(InputAction.CallbackContext context);
         void OnGrenade(InputAction.CallbackContext context);
         void OnScroll(InputAction.CallbackContext context);
+        void OnShop(InputAction.CallbackContext context);
     }
     public interface IUIActions
     {
diff --git a/Assets/Inputs/Controls.inputactions b/Assets/Inputs/Controls.inputactions
index 9e1c048..6f67b37 100644
--- a/Assets/Inputs/Controls.inputactions
+++ b/Assets/Inputs/Controls.inputactions
@@ -67,6 +67,15 @@
                     "processors": "",
                     "interactions": "",
                     "initialStateCheck": true
+                },
+                {
+                    "name": "Shop",
+                    "type": "Button",
+                    "id": "56c20ab6-5f48-4039-9aad-b647a614abf0",
+                    "expectedControlType": "Button",
+                    "processors": "",
+                    "interactions": "",
+                    "initialStateCheck": false
                 }
             ],
             "bindings": [
@@ -333,6 +342,17 @@
                     "action": "Scroll",
                     "isComposite": false,
                     "isPartOfComposite": false
+                },
+                {
+                    "name": "",
+                    "id": "138f3252-18be-4009-be6e-76a4acbe357b",
+                    "path": "<Keyboard>/b",
+                    "interactions": "",
+                    "processors": "",
+                    "groups": "Keyboard&Mouse",
+                    "action": "Shop",
+                    "isComposite": false,
+                    "isPartOfComposite": false
                 }
             ]
         },
diff --git a/Assets/Scenes/Main.unity b/Assets/Scenes/Main.unity
index d8dc4bc..e838f26 100644
--- a/Assets/Scenes/Main.unity
+++ b/Assets/Scenes/Main.unity
@@ -38,7 +38,7 @@ RenderSettings:
   m_ReflectionIntensity: 1
   m_CustomReflection: {fileID: 8900000, guid: a7bed68887a07e34394d4191b3081359, type: 3}
   m_Sun: {fileID: 0}
-  m_IndirectSpecularColor: {r: 0.10003871, g: 0.118095554, b: 0.11640027, a: 1}
+  m_IndirectSpecularColor: {r: 0.100039154, g: 0.11809585, b: 0.11640041, a: 1}
   m_UseRadianceAmbientProbe: 0
 --- !u!157 &4
 LightmapSettings:
@@ -154,7 +154,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 1436637204}
+  m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
@@ -248,7 +248,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 1979757894}
+  m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 1}
   m_AnchorMax: {x: 0.5, y: 1}
@@ -1117,6 +1117,24 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 246063894}
   m_CullTransparentMesh: 1
+--- !u!1 &260284131
+GameObject:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 300804368}
+  - component: {fileID: 300804370}
+  - component: {fileID: 300804369}
+  m_Layer: 5
+  m_Name: Image
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
 --- !u!1 &261666526
 GameObject:
   m_ObjectHideFlags: 0
@@ -1157,104 +1175,39 @@ VideoPlayer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 261666526}
   m_Enabled: 1
-  m_Alpha: 1
-  m_Interactable: 1
-  m_BlocksRaycasts: 1
-  m_IgnoreParentGroups: 0
---- !u!114 &244922609
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 244922606}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_IgnoreReversedGraphics: 1
-  m_BlockingObjects: 0
-  m_BlockingMask:
-    serializedVersion: 2
-    m_Bits: 4294967295
---- !u!223 &244922610
-Canvas:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 244922606}
-  m_Enabled: 0
-  serializedVersion: 3
-  m_RenderMode: 0
-  m_Camera: {fileID: 0}
-  m_PlaneDistance: 100
-  m_PixelPerfect: 0
-  m_ReceivesEvents: 1
-  m_OverrideSorting: 0
-  m_OverridePixelPerfect: 0
-  m_SortingBucketNormalizedSize: 0
-  m_VertexColorAlwaysGammaSpace: 0
-  m_AdditionalShaderChannelsFlag: 25
-  m_UpdateRectTransformForStandalone: 0
-  m_SortingLayerID: 0
-  m_SortingOrder: 0
-  m_TargetDisplay: 0
---- !u!114 &244922611
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 244922606}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 189bfb9c6772b6b4a87e12cd8b9af36f, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  paused: {fileID: 24500000, guid: 5b84db49d40ea449aa4f3e3bd229ab5b, type: 2}
-  unpaused: {fileID: 24500003, guid: 5b84db49d40ea449aa4f3e3bd229ab5b, type: 2}
---- !u!114 &244922612
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 244922606}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 19ed055c6eb86c94ba753f5adfd3bf80, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  masterMixer: {fileID: 24100000, guid: 5b84db49d40ea449aa4f3e3bd229ab5b, type: 2}
-  sfxSlider: {fileID: 269909663}
-  musicSlider: {fileID: 885988012}
---- !u!1 &260284131
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 300804368}
-  - component: {fileID: 300804370}
-  - component: {fileID: 300804369}
-  m_Layer: 5
-  m_Name: Image
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
+  m_VideoClip: {fileID: 0}
+  m_TargetCameraAlpha: 1
+  m_TargetCamera3DLayout: 0
+  m_TargetCamera: {fileID: 0}
+  m_TargetTexture: {fileID: 0}
+  m_TimeReference: 0
+  m_TargetMaterialRenderer: {fileID: 0}
+  m_TargetMaterialProperty: <noninit>
+  m_RenderMode: 5
+  m_AspectRatio: 2
+  m_DataSource: 0
+  m_TimeUpdateMode: 2
+  m_PlaybackSpeed: 1
+  m_AudioOutputMode: 0
+  m_TargetAudioSources: []
+  m_DirectAudioVolumes: []
+  m_Url: 
+  m_EnabledAudioTracks: 
+  m_DirectAudioMutes: 
+  m_ControlledAudioTrackCount: 0
+  m_PlayOnAwake: 1
+  m_SkipOnDrop: 1
+  m_Looping: 0
+  m_WaitForFirstFrame: 1
+  m_FrameReadyEventEnabled: 0
+  m_VideoShaders: []
 --- !u!224 &300804368
 RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 300804367}
+  m_GameObject: {fileID: 260284131}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
@@ -1273,7 +1226,7 @@ MonoBehaviour:
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 300804367}
+  m_GameObject: {fileID: 260284131}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
@@ -1303,7 +1256,7 @@ CanvasRenderer:
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 300804367}
+  m_GameObject: {fileID: 260284131}
   m_CullTransparentMesh: 1
 --- !u!1 &364291059
 GameObject:
@@ -1700,84 +1653,6 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 414933736}
   m_CullTransparentMesh: 1
---- !u!1 &439736036
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 439736039}
-  - component: {fileID: 439736038}
-  - component: {fileID: 439736040}
-  m_Layer: 0
-  m_Name: EventSystem
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!114 &439736038
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 439736036}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_FirstSelected: {fileID: 0}
-  m_sendNavigationEvents: 1
-  m_DragThreshold: 10
---- !u!4 &439736039
-Transform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 439736036}
-  serializedVersion: 2
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_ConstrainProportionsScale: 0
-  m_Children: []
-  m_Father: {fileID: 0}
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &439736040
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 439736036}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 01614664b831546d2ae94a42149d80ac, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_SendPointerHoverToParent: 1
-  m_MoveRepeatDelay: 0.5
-  m_MoveRepeatRate: 0.1
-  m_XRTrackingOrigin: {fileID: 0}
-  m_ActionsAsset: {fileID: -944628639613478452, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_PointAction: {fileID: -1654692200621890270, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_MoveAction: {fileID: -8784545083839296357, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_SubmitAction: {fileID: 392368643174621059, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_CancelAction: {fileID: 7727032971491509709, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_LeftClickAction: {fileID: 3001919216989983466, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_MiddleClickAction: {fileID: -2185481485913320682, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_RightClickAction: {fileID: -4090225696740746782, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_ScrollWheelAction: {fileID: 6240969308177333660, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_TrackedDevicePositionAction: {fileID: 6564999863303420839, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_TrackedDeviceOrientationAction: {fileID: 7970375526676320489, guid: ca9f5fa95ffab41fb9a615ab714db018, type: 3}
-  m_DeselectOnBackgroundClick: 1
-  m_PointerBehavior: 0
-  m_CursorLockBehavior: 0
 --- !u!1 &461218463
 GameObject:
   m_ObjectHideFlags: 0
@@ -5344,7 +5219,7 @@ RectTransform:
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 1436637204}
+  m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
@@ -5453,8 +5328,8 @@ MonoBehaviour:
     m_DisabledTrigger: Disabled
   m_Interactable: 1
   m_TargetGraphic: {fileID: 1497441293}
-  m_TextComponent: {fileID: 197933897}
-  m_Placeholder: {fileID: 1830885105}
+  m_TextComponent: {fileID: 0}
+  m_Placeholder: {fileID: 0}
   m_ContentType: 0
   m_InputType: 0
   m_AsteriskChar: 42
@@ -5565,10 +5440,8 @@ RectTransform:
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 1830885107}
-  - {fileID: 197933899}
-  m_Father: {fileID: 1436637204}
+  m_Children: []
+  m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
@@ -5799,6 +5672,9 @@ GameObject:
   - component: {fileID: 1581133371}
   - component: {fileID: 1581133373}
   - component: {fileID: 1581133372}
+  - component: {fileID: 1536312381}
+  - component: {fileID: 1536312379}
+  - component: {fileID: 1536312380}
   m_Layer: 5
   m_Name: GameOverAsk
   m_TagString: Untagged
@@ -5806,32 +5682,27 @@ GameObject:
   m_NavMeshLayer: 0
   m_StaticEditorFlags: 0
   m_IsActive: 1
---- !u!224 &1581133371
-RectTransform:
+--- !u!114 &1536312379
+MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1581133370}
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_ConstrainProportionsScale: 0
-  m_Children: []
-  m_Father: {fileID: 1436637204}
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 0.5, y: 0.5}
-  m_AnchorMax: {x: 0.5, y: 0.5}
-  m_AnchoredPosition: {x: 0, y: -105}
-  m_SizeDelta: {x: 130, y: 50}
-  m_Pivot: {x: 0.5, y: 0.5}
---- !u!114 &1581133372
+  m_GameObject: {fileID: 1536312378}
+  m_Enabled: 1
+  m_EditorHideFlags: 0
+  m_Script: {fileID: 11500000, guid: c7b6e7c3c78b01d4eb3cc6223c46fc2f, type: 3}
+  m_Name: 
+  m_EditorClassIdentifier: 
+  countdownTime: 10
+  countdownDisplay: {fileID: 1536312380}
+--- !u!114 &1536312380
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1581133370}
+  m_GameObject: {fileID: 1536312378}
   m_Enabled: 1
   m_EditorHideFlags: 0
   m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
@@ -5847,7 +5718,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 46238fb1ad7a7a84ba8954c1c860994c, type: 3}
-    m_FontSize: 30
+    m_FontSize: 50
     m_FontStyle: 0
     m_BestFit: 0
     m_MinSize: 0
@@ -5858,49 +5729,35 @@ MonoBehaviour:
     m_HorizontalOverflow: 1
     m_VerticalOverflow: 1
     m_LineSpacing: 1
-  m_Text: Start a new game?
---- !u!222 &1581133373
+  m_Text: 10
+--- !u!222 &1536312381
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1581133370}
+  m_GameObject: {fileID: 1536312378}
   m_CullTransparentMesh: 1
---- !u!1 &1630565378
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 1630565382}
-  - component: {fileID: 1630565381}
-  - component: {fileID: 1630565380}
-  - component: {fileID: 1630565379}
-  m_Layer: 5
-  m_Name: CountdownText
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!114 &1536312379
-MonoBehaviour:
+--- !u!224 &1581133371
+RectTransform:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1536312378}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: c7b6e7c3c78b01d4eb3cc6223c46fc2f, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  countdownTime: 10
-  countdownDisplay: {fileID: 1536312380}
---- !u!114 &1536312380
+  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+  m_LocalPosition: {x: 0, y: 0, z: 0}
+  m_LocalScale: {x: 1, y: 1, z: 1}
+  m_ConstrainProportionsScale: 0
+  m_Children: []
+  m_Father: {fileID: 1722116047}
+  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+  m_AnchorMin: {x: 0.5, y: 0.5}
+  m_AnchorMax: {x: 0.5, y: 0.5}
+  m_AnchoredPosition: {x: 0, y: -105}
+  m_SizeDelta: {x: 130, y: 50}
+  m_Pivot: {x: 0.5, y: 0.5}
+--- !u!114 &1581133372
 MonoBehaviour:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -5922,7 +5779,7 @@ MonoBehaviour:
       m_Calls: []
   m_FontData:
     m_Font: {fileID: 12800000, guid: 46238fb1ad7a7a84ba8954c1c860994c, type: 3}
-    m_FontSize: 50
+    m_FontSize: 30
     m_FontStyle: 0
     m_BestFit: 0
     m_MinSize: 0
@@ -5933,8 +5790,8 @@ MonoBehaviour:
     m_HorizontalOverflow: 1
     m_VerticalOverflow: 1
     m_LineSpacing: 1
-  m_Text: 10
---- !u!222 &1536312381
+  m_Text: Start a new game?
+--- !u!222 &1581133373
 CanvasRenderer:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
@@ -5942,25 +5799,37 @@ CanvasRenderer:
   m_PrefabAsset: {fileID: 0}
   m_GameObject: {fileID: 1536312378}
   m_CullTransparentMesh: 1
---- !u!224 &1536312382
-RectTransform:
+--- !u!1 &1630565378
+GameObject:
   m_ObjectHideFlags: 0
   m_CorrespondingSourceObject: {fileID: 0}
   m_PrefabInstance: {fileID: 0}
   m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1536312378}
+  serializedVersion: 6
+  m_Component:
+  - component: {fileID: 1630565379}
+  m_Layer: 5
+  m_Name: CountdownText
+  m_TagString: Untagged
+  m_Icon: {fileID: 0}
+  m_NavMeshLayer: 0
+  m_StaticEditorFlags: 0
+  m_IsActive: 1
+--- !u!4 &1630565379
+Transform:
+  m_ObjectHideFlags: 0
+  m_CorrespondingSourceObject: {fileID: 0}
+  m_PrefabInstance: {fileID: 0}
+  m_PrefabAsset: {fileID: 0}
+  m_GameObject: {fileID: 1630565378}
+  serializedVersion: 2
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
   m_LocalScale: {x: 1, y: 1, z: 1}
   m_ConstrainProportionsScale: 0
   m_Children: []
-  m_Father: {fileID: 1722116047}
+  m_Father: {fileID: 0}
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
-  m_AnchorMin: {x: 1, y: 1}
-  m_AnchorMax: {x: 1, y: 1}
-  m_AnchoredPosition: {x: -69, y: -47}
-  m_SizeDelta: {x: 130, y: 50}
-  m_Pivot: {x: 0.5, y: 0.5}
 --- !u!1001 &1641232233
 PrefabInstance:
   m_ObjectHideFlags: 0
@@ -6693,7 +6562,7 @@ RectTransform:
   - {fileID: 1931296998}
   - {fileID: 687138047}
   - {fileID: 1062315028}
-  - {fileID: 1536312382}
+  - {fileID: 1581133371}
   - {fileID: 2141633467}
   - {fileID: 246063895}
   - {fileID: 867131481}
@@ -8153,6 +8022,7 @@ CanvasRenderer:
 SceneRoots:
   m_ObjectHideFlags: 0
   m_Roots:
+  - {fileID: 1630565379}
   - {fileID: 1851598982}
   - {fileID: 1047928118}
   - {fileID: 1889514490}
@@ -8163,7 +8033,10 @@ SceneRoots:
   - {fileID: 68121383}
   - {fileID: 465095258}
   - {fileID: 218985453}
-  - {fileID: 439736039}
   - {fileID: 990504894}
   - {fileID: 480482687}
   - {fileID: 1102438310}
+  - {fileID: 4043336}
+  - {fileID: 28357258}
+  - {fileID: 1450818667}
+  - {fileID: 1497441295}
diff --git a/Assets/Scenes/Menu.unity b/Assets/Scenes/Menu.unity
index 369664a..af83063 100644
--- a/Assets/Scenes/Menu.unity
+++ b/Assets/Scenes/Menu.unity
@@ -6873,7 +6873,7 @@ MonoBehaviour:
           m_StringArgument: 
           m_BoolArgument: 0
         m_CallState: 2
-  m_IsOn: 1
+  m_IsOn: 0
 --- !u!1 &2143127131
 GameObject:
   m_ObjectHideFlags: 0
diff --git a/Assets/Scenes/Shop.unity b/Assets/Scenes/Shop.unity
index 7fe8a53..ba600ce 100644
--- a/Assets/Scenes/Shop.unity
+++ b/Assets/Scenes/Shop.unity
@@ -3044,38 +3044,6 @@ PrefabInstance:
     m_AddedGameObjects: []
     m_AddedComponents: []
   m_SourcePrefab: {fileID: 100100000, guid: f52e1c8dbf37fd44cb9b1d71c7e942d2, type: 3}
---- !u!1 &1165414996
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 1165414997}
-  m_Layer: 0
-  m_Name: Managers
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!4 &1165414997
-Transform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1165414996}
-  serializedVersion: 2
-  m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_ConstrainProportionsScale: 0
-  m_Children:
-  - {fileID: 1236001945}
-  m_Father: {fileID: 0}
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
 --- !u!1 &1212966710
 GameObject:
   m_ObjectHideFlags: 0
@@ -3129,89 +3097,6 @@ BoxCollider:
   serializedVersion: 3
   m_Size: {x: 2.6714668, y: 3.0484924, z: 1.128832}
   m_Center: {x: -0.4395647, y: 1.4388156, z: -0.34513283}
---- !u!1 &1236001944
-GameObject:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  serializedVersion: 6
-  m_Component:
-  - component: {fileID: 1236001945}
-  - component: {fileID: 1236001948}
-  - component: {fileID: 1236001947}
-  - component: {fileID: 1236001946}
-  m_Layer: 0
-  m_Name: EventSystem
-  m_TagString: Untagged
-  m_Icon: {fileID: 0}
-  m_NavMeshLayer: 0
-  m_StaticEditorFlags: 0
-  m_IsActive: 1
---- !u!4 &1236001945
-Transform:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1236001944}
-  serializedVersion: 2
-  m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
-  m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 1, y: 1, z: 1}
-  m_ConstrainProportionsScale: 0
-  m_Children: []
-  m_Father: {fileID: 1165414997}
-  m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
---- !u!114 &1236001946
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1236001944}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 2d49b7c1bcd2e07499844da127be038d, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_SendPointerHoverToParent: 1
-  m_ForceModuleActive: 0
---- !u!114 &1236001947
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1236001944}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_SendPointerHoverToParent: 1
-  m_HorizontalAxis: Horizontal
-  m_VerticalAxis: Vertical
-  m_SubmitButton: Submit
-  m_CancelButton: Cancel
-  m_InputActionsPerSecond: 10
-  m_RepeatDelay: 0.5
-  m_ForceModuleActive: 0
---- !u!114 &1236001948
-MonoBehaviour:
-  m_ObjectHideFlags: 0
-  m_CorrespondingSourceObject: {fileID: 0}
-  m_PrefabInstance: {fileID: 0}
-  m_PrefabAsset: {fileID: 0}
-  m_GameObject: {fileID: 1236001944}
-  m_Enabled: 1
-  m_EditorHideFlags: 0
-  m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
-  m_Name: 
-  m_EditorClassIdentifier: 
-  m_FirstSelected: {fileID: 0}
-  m_sendNavigationEvents: 1
-  m_DragThreshold: 5
 --- !u!1 &1265858856
 GameObject:
   m_ObjectHideFlags: 0
@@ -6198,7 +6083,6 @@ SceneRoots:
   m_Roots:
   - {fileID: 1158354051}
   - {fileID: 1591794899}
-  - {fileID: 1165414997}
   - {fileID: 183304858}
   - {fileID: 1621979631}
   - {fileID: 697161332}
diff --git a/Assets/Scripts/Managers/CheatManager.cs b/Assets/Scripts/Managers/CheatManager.cs
index 004edb4..d45815a 100644
--- a/Assets/Scripts/Managers/CheatManager.cs
+++ b/Assets/Scripts/Managers/CheatManager.cs
@@ -35,16 +35,13 @@ public class CheatManager : MonoBehaviour
     string textInput;
     public InputField inputField;
     bool cheatOpened;
-
-    Controls control;
     InputAction cheatInput;
 
     bool[] cheats = new bool[3];
 
     private void Awake()
     {
-        control = new Controls();
-        cheatInput = control.Player.Cheat;
+        cheatInput = ControlRef.control.Player.Cheat;
         cheatOpened = false;
 
         hud = GameObject.Find("HUDCanvas").GetComponent<HUDisplay>();
@@ -57,15 +54,11 @@ public class CheatManager : MonoBehaviour
 
     private void OnEnable()
     {
-        cheatInput.Enable();
-
         cheatInput.performed += ToggleCheat;
     }
 
     private void OnDisable()
     {
-        cheatInput.Disable();
-
         cheatInput.performed -= ToggleCheat;
     }
 
diff --git a/Assets/Scripts/Managers/CinematicController.cs b/Assets/Scripts/Managers/CinematicController.cs
index 0afc099..ff86e8a 100644
--- a/Assets/Scripts/Managers/CinematicController.cs
+++ b/Assets/Scripts/Managers/CinematicController.cs
@@ -20,25 +20,12 @@ namespace Nightmare
         private Camera mainCam;
         private VideoPlayer videoPlayer;
         private int currentCinematic;
-
-        private Controls control;
         private InputAction skip;
 
         // Use this for initialization
         private void Awake()
         {
-            control = new Controls();
-            skip = control.UI.Skip;
-        }
-
-        private void OnEnable()
-        {
-            skip.Enable();
-        }
-
-        private void OnDisable()
-        {
-            skip.Disable();
+            skip = ControlRef.control.UI.Skip;
         }
 
         void Start()
diff --git a/Assets/Scripts/Managers/DialogueManager.cs b/Assets/Scripts/Managers/DialogueManager.cs
index 735dad0..562b5b7 100644
--- a/Assets/Scripts/Managers/DialogueManager.cs
+++ b/Assets/Scripts/Managers/DialogueManager.cs
@@ -17,13 +17,11 @@ public class DialogueManager : MonoBehaviour
 
     private int index;
     private bool isDialogueFinished = false;
-    private Controls controls;
     private InputAction click;
 
     private void Awake()
     {
-        controls = new Controls();
-        click = controls.UI.Click;
+        click = ControlRef.control.UI.Click;
 
         Time.timeScale = 0;
         QuestCanvas.enabled = false;
@@ -34,16 +32,12 @@ public class DialogueManager : MonoBehaviour
 
     private void OnEnable()
     {
-        click.Enable();
-
         click.performed += AdvanceDialog;
     }
 
     private void OnDisable()
     {
         click.performed -= AdvanceDialog;
-
-        click.Disable();
     }
 
     private void AdvanceDialog(InputAction.CallbackContext ctx)
diff --git a/Assets/Scripts/Managers/PauseManager.cs b/Assets/Scripts/Managers/PauseManager.cs
index 4dc290a..3d08c77 100644
--- a/Assets/Scripts/Managers/PauseManager.cs
+++ b/Assets/Scripts/Managers/PauseManager.cs
@@ -13,24 +13,11 @@ public class PauseManager : MonoBehaviour {
 	public AudioMixerSnapshot unpaused;
 	
 	Canvas canvas;
-
-    private Controls control;
     private InputAction escape;
 
     private void Awake()
     {
-        control = new Controls();
-        escape = control.UI.Cancel;
-    }
-
-    private void OnEnable()
-    {
-        escape.Enable();
-    }
-
-    private void OnDisable()
-    {
-        escape.Disable();
+        escape = ControlRef.control.UI.Cancel;
     }
 
     void Start()
diff --git a/Assets/Scripts/Managers/QuestManager.cs b/Assets/Scripts/Managers/QuestManager.cs
index 33e0722..bf492c5 100644
--- a/Assets/Scripts/Managers/QuestManager.cs
+++ b/Assets/Scripts/Managers/QuestManager.cs
@@ -17,14 +17,11 @@ public class QuestManager : MonoBehaviour
     [SerializeField] Canvas CompletedCanvas;
 
     PlayerCurrency playerCurr;
-
-    Controls controls;
     InputAction click;
 
     private void Awake()
     {
-        controls = new Controls();
-        click = controls.UI.Click;
+        click = ControlRef.control.UI.Click;
         currQuest = questList[0];
         CompletedCanvas.enabled = false;
         loadedNext = false;
@@ -34,12 +31,6 @@ public class QuestManager : MonoBehaviour
     private void OnEnable()
     {
         SceneManager.sceneLoaded += OnSceneLoaded;
-        click.Enable();
-    }
-
-    private void OnDisable()
-    {
-        click.Disable();
     }
 
     public Quest getCurrentQuest()
diff --git a/Assets/Scripts/Managers/SettingsManager.cs b/Assets/Scripts/Managers/SettingsManager.cs
index 7db40c7..36e9fa2 100644
--- a/Assets/Scripts/Managers/SettingsManager.cs
+++ b/Assets/Scripts/Managers/SettingsManager.cs
@@ -11,6 +11,7 @@ public class SettingsManager : MonoBehaviour
 
     private void Awake()
     {
+        ControlRef.control.Enable();
         nameInput.text = PlayerPrefs.GetString("PlayerName", "");
         toggles[PlayerPrefs.GetInt("Difficulty", 0)].isOn = true;
 
diff --git a/Assets/Scripts/Player/PlayerPetSpawner.cs b/Assets/Scripts/Player/PlayerPetSpawner.cs
index 779ff7c..f749b6d 100644
--- a/Assets/Scripts/Player/PlayerPetSpawner.cs
+++ b/Assets/Scripts/Player/PlayerPetSpawner.cs
@@ -1,4 +1,5 @@
 using UnityEngine;
+using UnityEngine.InputSystem;
 
 namespace Nightmare
 {
@@ -10,15 +11,15 @@ namespace Nightmare
 
         void Update()
         {
-            if (Input.GetKeyDown(KeyCode.Q))
+            if (Keyboard.current.qKey.wasPressedThisFrame)
             {
                 Instantiate(healingPet, transform.position, Quaternion.identity);
             }
-            if (Input.GetKeyDown(KeyCode.B))
+            if (Keyboard.current.bKey.wasPressedThisFrame)
             {
                 Instantiate(attackingPet, transform.position, Quaternion.identity);
             }
-            if (Input.GetKeyDown(KeyCode.V))
+            if (Keyboard.current.vKey.wasPressedThisFrame)
             {
                 Instantiate(enemyPet, transform.position, Quaternion.identity);
             }
diff --git a/Assets/ShopManager.cs b/Assets/ShopManager.cs
index 2d833d2..9ddb23f 100644
--- a/Assets/ShopManager.cs
+++ b/Assets/ShopManager.cs
@@ -1,6 +1,7 @@
 using UnityEngine;
 using UnityEngine.UI;
 using System;
+using UnityEngine.InputSystem;
 
 
 #if UNITY_EDITOR
@@ -23,16 +24,17 @@ public class ShopManager : MonoBehaviour {
 	GameObject shopPanel;
 	GameObject messagePanel;
 	Canvas canvas;
+	InputAction shopAction;
 	float messageTimer;
 
 	bool isAccessible;
 
 	void Awake()
 	{
-	
+		shopAction = ControlRef.control.Player.Shop;
 	}
 
-	void Start()
+    void Start()
 	{
 		canvas = GetComponent<Canvas>();
 		canvas.enabled = false;
@@ -67,7 +69,7 @@ public class ShopManager : MonoBehaviour {
 	{
 		balanceText.text = playerCurrency.Balance().ToString();
 		messageTimer -= Time.deltaTime;
-		if (isAccessible && Input.GetKeyDown(KeyCode.B)) 
+		if (isAccessible && shopAction.WasPressedThisFrame()) 
 		{
 			if (shopPanel.activeSelf)
 			{
@@ -85,7 +87,7 @@ public class ShopManager : MonoBehaviour {
 			showMessage("Press key B to open shop");
 			return;
 		}   
-		else if (!isAccessible && Input.GetKeyDown(KeyCode.B)) 
+		else if (!isAccessible && shopAction.WasPressedThisFrame()) 
 		{
 			messageTimer = messageDelay; 
 			resetCanvas();
-- 
GitLab