コード例 #1
0
 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();
     }
 }
コード例 #2
0
 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;
     }
 }
コード例 #3
0
 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
     }
 }
コード例 #4
0
 public abstract void UndoBind(Stack <KeyCode> oldKeys, KeyBindingScriptableObj keybinds, Text txt);
コード例 #5
0
 public abstract void Execute(Text txt, Command command, KeyBindingScriptableObj binds, KeyCode temp, bool check);