Example #1
0
 public static IInputHandler Trigger(InputChecker check) => new InputHandler(InputTriggerMethod.ONCE, check);
Example #2
0
 public static IInputHandler Hold(InputChecker check) => new InputHandler(InputTriggerMethod.PERSISTENT, check);
Example #3
0
 private InputHandler(InputTriggerMethod method, InputChecker check)
 {
     refractory = false;
     trigger    = method;
     checker    = check;
 }
Example #4
0
 public static IInputHandler Toggle(InputChecker check) => new InputHandler(InputTriggerMethod.ONCE_TOGGLE, check);
Example #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));