コード例 #1
0
ファイル: InputManager.cs プロジェクト: emilovici17/Milro
        public KeyCode GetKeyForAction(KeybindingAction action)
        {
            // Find keycode
            foreach (Keybindings.Keybinding keybinding in keybindings.keybindings)
            {
                if (keybinding.action == action)
                {
                    return(keybinding.keycode);
                }
            }

            return(KeyCode.None);
        }
コード例 #2
0
ファイル: InputManager.cs プロジェクト: emilovici17/Milro
 public bool GetKeyUp(KeybindingAction action)
 {
     return(Input.GetKey(GetKeyForAction(action)));
 }