public override void UndoBind(Stack <KeyCode> oldKeys, KeyBindingScriptableObj keybinds, Text txt) { if (oldKeys.Count > 0) { Debug.Log("Undoing Key bind"); txt.text = oldKeys.Peek().ToString(); keybinds.left = oldKeys.Pop(); } }
public override void Execute(Text txt, Command command, KeyBindingScriptableObj binds, KeyCode temp, bool check) { if (binds.left == KeyCode.None && check) { txt.text = temp.ToString(); binds.left = temp; check = false; } }
public override void UndoBind(Stack <KeyCode> oldKeys, KeyBindingScriptableObj keybinds, Text txt) { if (oldKeys.Count > 0) { Debug.Log("Undoing Key bind"); // Adds to log txt.text = oldKeys.Peek().ToString(); // Peek at top of stack keybinds.forward = oldKeys.Pop(); // Pop stack and used for key binding } }
public abstract void UndoBind(Stack <KeyCode> oldKeys, KeyBindingScriptableObj keybinds, Text txt);
public abstract void Execute(Text txt, Command command, KeyBindingScriptableObj binds, KeyCode temp, bool check);