コード例 #1
0
ファイル: InputUtility.cs プロジェクト: Tzbob/TakGu
        public static void ExecuteOnToggle(List<Buttons> buttons, GamePadState oldState, GamePadState newState, Utility.Delegate_Paramless execute)
        {
            bool isOneToggled = false;

            foreach (Buttons button in buttons)
                isOneToggled |= IsButtonToggled(button, oldState, newState);

            if (isOneToggled)
                execute();
        }
コード例 #2
0
ファイル: InputUtility.cs プロジェクト: Tzbob/TakGu
        public static void ExecuteOnToggle(List<Keys> keys, KeyboardState oldState, KeyboardState newState, Utility.Delegate_Paramless execute)
        {
            bool isOneToggled = false;

            foreach (Keys key in keys)
                isOneToggled |= IsKeyToggled(key, oldState, newState) && !IsModifierUsed(newState);

            if(isOneToggled)
                execute();
        }
コード例 #3
0
ファイル: InputUtility.cs プロジェクト: Tzbob/TakGu
        public static void ExecuteOnToggle(List<Tuple<Keys, Keys>> keys, KeyboardState oldState, KeyboardState newState, Utility.Delegate_Paramless execute)
        {
            bool isOneToggled = false;

            foreach (Tuple<Keys,Keys> key in keys)
                isOneToggled |= IsKeyToggled(key.Item2, oldState, newState) && newState.IsKeyDown(key.Item1);

            if(isOneToggled)
                execute();
        }
コード例 #4
0
ファイル: InputUtility.cs プロジェクト: Tzbob/TakGu
 public static void ExecuteOnToggle(Buttons button, GamePadState oldState, GamePadState newState, Utility.Delegate_Paramless execute)
 {
     if(IsButtonToggled(button, oldState, newState))
         execute();
 }
コード例 #5
0
ファイル: InputUtility.cs プロジェクト: Tzbob/TakGu
 public static void ExecuteOnToggle(Keys key, KeyboardState oldState, KeyboardState newState, Utility.Delegate_Paramless execute)
 {
     if(IsKeyToggled(key, oldState, newState))
         execute();
 }