예제 #1
0
    public KInputController AddKeyboardMouseController()
    {
        KInputController kInputController = new KInputController(false);

        BindingEntry[] bindingEntries = GameInputMapping.GetBindingEntries();
        for (int i = 0; i < bindingEntries.Length; i++)
        {
            BindingEntry bindingEntry = bindingEntries[i];
            kInputController.Bind(bindingEntry.mKeyCode, bindingEntry.mModifier, bindingEntry.mAction);
        }
        AddController(kInputController);
        return(kInputController);
    }
예제 #2
0
    public KInputController AddGamepadController(int gamepad_index)
    {
        KInputController kInputController = new KInputController(true);

        BindingEntry[] bindingEntries = GameInputMapping.GetBindingEntries();
        for (int i = 0; i < bindingEntries.Length; i++)
        {
            BindingEntry bindingEntry = bindingEntries[i];
            kInputController.Bind(BindingEntry.GetGamepadKeyCode(gamepad_index, bindingEntry.mButton), Modifier.None, bindingEntry.mAction);
        }
        AddController(kInputController);
        return(kInputController);
    }