Exemplo n.º 1
0
        /*
         * /// <summary>
         * /// Gets whether a <see cref="Keys"/> is currently held down
         * /// </summary>
         * /// <param name="key">The key.</param>
         * /// <returns></returns>
         * public static bool IsKeyPressed(Keys key)
         * {
         *      return ScriptDomain.CurrentDomain.IsKeyPressed(key);
         * }
         */

        /// <summary>
        /// Gets whether a <see cref="ButtonCombination"/> was entered.
        /// </summary>
        /// <param name="combination">The <see cref="ButtonCombination"/> to check against.</param>
        /// <returns><c>true</c> if the <see cref="ButtonCombination"/> was just entered; otherwise, <c>false</c></returns>
        /// <remarks>
        /// Only works for Gamepad inputs
        /// Cheat combinations use the same system
        /// </remarks>
        public static bool WasButtonCombinationJustEntered(ButtonCombination combination)
        {
            return(API.HasButtonCombinationJustBeenEntered((uint)combination.Hash, combination.Length));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Gets whether a <see cref="Keys"/> is currently held down
        /// </summary>
        /// <param name="key">The key.</param>
        /// <returns></returns>

        /*public static bool IsKeyPressed(Keys key)
         * {
         *      return ScriptDomain.CurrentDomain.IsKeyPressed(key);
         * }*/

        /// <summary>
        /// Gets whether a <see cref="ButtonCombination"/> was entered.
        /// </summary>
        /// <param name="combination">The <see cref="ButtonCombination"/> to check against.</param>
        /// <returns><c>true</c> if the <see cref="ButtonCombination"/> was just entered; otherwise, <c>false</c></returns>
        /// <remarks>
        /// Only works for Gamepad inputs
        /// Cheat combinations use the same system
        /// </remarks>
        public static bool WasButtonCombinationJustEntered(ButtonCombination combination)
        {
            return(Function.Call <bool>(Hash._HAS_BUTTON_COMBINATION_JUST_BEEN_ENTERED, combination.Hash, combination.Length));
        }