Exemple #1
0
        public static InputAction ActionFor(RLKeyPress rlKeyPress)
        {
            var keyPress = rlKeyPress.AsKeyPress();

            int i = 0; // Start guaranteed to be 0 so array accesses line up

            foreach (var keyBind in keyBindings)
            {
                // If a keybind is unused, just say null
                if (keyPress == keyBind)
                {
                    return((InputAction)i);
                }
                i++;
            }

            return(InputAction.NONE);
        }