using UnityEngine; using UnityEngine.InputSystem; namespace VOID.Generic.Player.Input { [DefaultExecutionOrder(1)] public class ShortcutsInputManager : MonoBehaviour { public static ShortcutsInputManager current {get; private set;} private Inputs _inputs; public InputAction menu {get; private set;} public InputAction inventory {get; private set;} public InputAction equipment {get; private set;} public InputAction abilityBook {get; private set;} public InputAction logBook {get; private set;} public InputAction map {get; private set;} public InputAction actionBarNext {get; private set;} public InputAction actionBarPrevious {get; private set;} public InputAction actionBarSlot1 {get; private set;} public InputAction actionBarSlot2 {get; private set;} public InputAction actionBarSlot3 {get; private set;} public InputAction actionBarSlot4 {get; private set;} public InputAction actionBarSlot5 {get; private set;} public InputAction actionBarSlot6 {get; private set;} public InputAction actionBarSlot7 {get; private set;} public InputAction actionBarSlot8 {get; private set;} public InputAction actionBarSlot9 {get; private set;} public InputAction actionBarSlot10 {get; private set;} public InputAction actionBarSlot11 {get; private set;} public InputAction actionBarSlot12 {get; private set;} public InputAction actionBarSlot13 {get; private set;} public InputAction actionBarSlot14 {get; private set;} public InputAction actionBarSlot15 {get; private set;} public InputAction actionBarSlot16 {get; private set;} public InputAction actionBarSlot17 {get; private set;} public InputAction actionBarSlot18 {get; private set;} public InputAction actionBarSlot19 {get; private set;} public InputAction actionBarSlot20 {get; private set;} public InputAction actionBarSlot21 {get; private set;} public InputAction actionBarSlot22 {get; private set;} public InputAction actionBarSlot23 {get; private set;} public InputAction actionBarSlot24 {get; private set;} public InputAction actionBarSlot25 {get; private set;} private void Awake() { current = this; _inputs = new Inputs(); menu = _inputs.ShortcutsControls.Menu; inventory = _inputs.ShortcutsControls.Inventory; equipment = _inputs.ShortcutsControls.Equipment; abilityBook = _inputs.ShortcutsControls.AbilityBook; logBook = _inputs.ShortcutsControls.LogBook; map = _inputs.ShortcutsControls.Map; actionBarNext = _inputs.ShortcutsControls.ActionBarNext; actionBarPrevious = _inputs.ShortcutsControls.ActionBarPrevious; actionBarSlot1 = _inputs.ShortcutsControls.ActionBarSlot1; actionBarSlot2 = _inputs.ShortcutsControls.ActionBarSlot2; actionBarSlot3 = _inputs.ShortcutsControls.ActionBarSlot3; actionBarSlot4 = _inputs.ShortcutsControls.ActionBarSlot4; actionBarSlot5 = _inputs.ShortcutsControls.ActionBarSlot5; actionBarSlot6 = _inputs.ShortcutsControls.ActionBarSlot6; actionBarSlot7 = _inputs.ShortcutsControls.ActionBarSlot7; actionBarSlot8 = _inputs.ShortcutsControls.ActionBarSlot8; actionBarSlot9 = _inputs.ShortcutsControls.ActionBarSlot9; actionBarSlot10 = _inputs.ShortcutsControls.ActionBarSlot10; actionBarSlot11 = _inputs.ShortcutsControls.ActionBarSlot11; actionBarSlot12 = _inputs.ShortcutsControls.ActionBarSlot12; actionBarSlot13 = _inputs.ShortcutsControls.ActionBarSlot13; actionBarSlot14 = _inputs.ShortcutsControls.ActionBarSlot14; actionBarSlot15 = _inputs.ShortcutsControls.ActionBarSlot15; actionBarSlot16 = _inputs.ShortcutsControls.ActionBarSlot16; actionBarSlot17 = _inputs.ShortcutsControls.ActionBarSlot17; actionBarSlot18 = _inputs.ShortcutsControls.ActionBarSlot18; actionBarSlot19 = _inputs.ShortcutsControls.ActionBarSlot19; actionBarSlot20 = _inputs.ShortcutsControls.ActionBarSlot20; actionBarSlot21 = _inputs.ShortcutsControls.ActionBarSlot21; actionBarSlot22 = _inputs.ShortcutsControls.ActionBarSlot22; actionBarSlot23 = _inputs.ShortcutsControls.ActionBarSlot23; actionBarSlot24 = _inputs.ShortcutsControls.ActionBarSlot24; actionBarSlot25 = _inputs.ShortcutsControls.ActionBarSlot25; } private void OnEnable() { menu.Enable(); inventory.Enable(); equipment.Enable(); abilityBook.Enable(); logBook.Enable(); map.Enable(); actionBarNext.Enable(); actionBarPrevious.Enable(); actionBarSlot1.Enable(); actionBarSlot2.Enable(); actionBarSlot3.Enable(); actionBarSlot4.Enable(); actionBarSlot5.Enable(); actionBarSlot6.Enable(); actionBarSlot7.Enable(); actionBarSlot8.Enable(); actionBarSlot9.Enable(); actionBarSlot10.Enable(); actionBarSlot11.Enable(); actionBarSlot12.Enable(); actionBarSlot13.Enable(); actionBarSlot14.Enable(); actionBarSlot15.Enable(); actionBarSlot16.Enable(); actionBarSlot17.Enable(); actionBarSlot18.Enable(); actionBarSlot19.Enable(); actionBarSlot20.Enable(); actionBarSlot21.Enable(); actionBarSlot22.Enable(); actionBarSlot23.Enable(); actionBarSlot24.Enable(); actionBarSlot25.Enable(); } private void OnDisable() { menu.Disable(); inventory.Disable(); equipment.Disable(); abilityBook.Disable(); logBook.Disable(); map.Disable(); actionBarNext.Disable(); actionBarPrevious.Disable(); actionBarSlot1.Disable(); actionBarSlot2.Disable(); actionBarSlot3.Disable(); actionBarSlot4.Disable(); actionBarSlot5.Disable(); actionBarSlot6.Disable(); actionBarSlot7.Disable(); actionBarSlot8.Disable(); actionBarSlot9.Disable(); actionBarSlot10.Disable(); actionBarSlot11.Disable(); actionBarSlot12.Disable(); actionBarSlot13.Disable(); actionBarSlot14.Disable(); actionBarSlot15.Disable(); actionBarSlot16.Disable(); actionBarSlot17.Disable(); actionBarSlot18.Disable(); actionBarSlot19.Disable(); actionBarSlot20.Disable(); actionBarSlot21.Disable(); actionBarSlot22.Disable(); actionBarSlot23.Disable(); actionBarSlot24.Disable(); actionBarSlot25.Disable(); } } }