Beispiel #1
0
 public static IInputHandler Trigger(InputChecker check) => new InputHandler(InputTriggerMethod.ONCE, check);
Beispiel #2
0
 public static IInputHandler Hold(InputChecker check) => new InputHandler(InputTriggerMethod.PERSISTENT, check);
Beispiel #3
0
 private InputHandler(InputTriggerMethod method, InputChecker check)
 {
     refractory = false;
     trigger    = method;
     checker    = check;
 }
Beispiel #4
0
 public static IInputHandler Toggle(InputChecker check) => new InputHandler(InputTriggerMethod.ONCE_TOGGLE, check);
Beispiel #5
0
 //Use this combiner when there are multiple keys that do the same thing
 public InputChecker Or(InputChecker other) =>
 new InputChecker(() => Active || other.Active,
                  LocalizedString.Format(new LocalizedString("{0} or {1}", "{0}や{1}"), keyDescr, other.keyDescr));