Ejemplo n.º 1
0
    // ------------------
    /// \brief Input.GetKey() replacement.
    ///
    /// Returns true when active controller's control with matching KeyCode OR an actual KeyCode is pressed.
    // ------------------
    static public bool GetKey(KeyCode key)
    {
        if (ControllerActive())
        {
            bool keySupported = false;
            bool keyState     = ctrl.GetKeyEx(key, out keySupported);
            if (keySupported)
            {
                return(keyState);
            }
        }

        return(Input.GetKey(key));
    }