/// <summary> /// Load the Keybind Manager and retrieves current keybinds /// </summary> private void Start() { Time.timeScale = 1; input = transform.GetComponent <KeybindManager>(); player1Keybinds = input.GetPlayerKeybinds(KeybindManager.PlayerOption.Player_1); player2Keybinds = input.GetPlayerKeybinds(KeybindManager.PlayerOption.Player_2); }
/// <summary> /// method to display currently bound key to Unity UI ; private /// </summary> private void DisplayCurrentKeybind() { currentKey = keybinder.GetPlayerKeybinds(player).FirstOrDefault(val => val.Value == keyToBind).Key; currentKeybind.text = currentKey.ToString(); }
/// <summary> /// Unpauses game and reloads keybinds in case they changed /// </summary> private void Unpause() { player1Keybinds = input.GetPlayerKeybinds(KeybindManager.PlayerOption.Player_1); player2Keybinds = input.GetPlayerKeybinds(KeybindManager.PlayerOption.Player_2); }