Exemple #1
0
    public static bool GetAnyButtonDown()
    {
#if USE_REWIRED
        for (int i = 0; i < 2; ++i)
        {
            RE.Player player = RE.ReInput.players.GetPlayer(i);
            if (player.GetAnyButtonDown())
            {
                return(true);
            }
        }

        return(false);
#else // USE_REWIRED
        if (Input.anyKeyDown)
        {
            return(true);
        }

        for (uint i = 0; i < 2; ++i)
        {
            bool anyDown =
                GameInput.GetXboxButton(i, GameInput.Xbox360Button.A) ||
                GameInput.GetXboxButtonDown(i, GameInput.Xbox360Button.B) ||
                GameInput.GetXboxButtonDown(i, GameInput.Xbox360Button.Start)
            ;
            if (anyDown)
            {
                return(true);
            }
        }

        return(false);
#endif // USE_REWIRED
    }