Beispiel #1
0
 public static bool WasButtonReleased(PlayerIndex aPlayerIndex, ButtonMap map)
 {
     return WasButtonReleased(aPlayerIndex, map.GamePadButton) || WasKeyReleased(map.Key) || WasMouseButtonReleased(map.MouseButton);
 }
Beispiel #2
0
        public static float TimeSinceButtonDown(PlayerIndex aPlayerIndex, ButtonMap map)
        {
            float[] times = new float[3];

            times[0] = TimeSinceButtonDown(aPlayerIndex, map.GamePadButton);
            times[1] = TimeSinceKeyDown(map.Key);
            times[2] = TimeSinceMouseButtonDown(map.MouseButton);

            return times.Min();
        }
Beispiel #3
0
 public static bool WasButtonDoubleTapped(PlayerIndex aPlayerIndex, ButtonMap map, float aMaxTimeBetweenPresses)
 {
     return WasButtonDoubleTapped(aPlayerIndex, map.GamePadButton, aMaxTimeBetweenPresses) ||
         WasKeyDoubleTapped(map.Key, aMaxTimeBetweenPresses) ||
         WasMouseButtonDoubleClicked(map.MouseButton, aMaxTimeBetweenPresses);
 }
Beispiel #4
0
 public static bool IsButtonDown(PlayerIndex aPlayerIndex, ButtonMap map)
 {
     return IsButtonDown(aPlayerIndex, map.GamePadButton) || IsKeyDown(map.Key) || IsMouseButtonDown(map.MouseButton);
 }