Ejemplo n.º 1
0
 public KeyComObj(List <KeyCode> keys, keycodes.registerCallback callback, bool repeat, bool pressed)
 {
     this.keys     = keys;
     this.callback = callback;
     this.repeat   = repeat;
     this.pressed  = pressed;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// This methode can be used to register a key up event. You can use it like this:
 /// Input.registerOnKeyUp(KeyCode.Space,callbackVoid,(optional true or false for repeat));
 ///
 /// </summary>
 /// <param name="code">The keycode you want to use, for example: KeyCode.Space</param>
 /// <param name="callback">The void that you want the system to callback once the given key is pressed</param>
 /// <param name="repeat">Do you want the event to stay alive after the first event.</param>
 public static void registerOnKeyUp(KeyCode code, keycodes.registerCallback callback, bool repeat = false)
 {
     if (repeat)
     {
         keycodes.registerKey(code, callback, inputTypes.repeatedUp);
     }
     else
     {
         keycodes.registerKey(code, callback, inputTypes.up);
     }
 }
Ejemplo n.º 3
0
 public static void registerOnMultipleKeysPressed(keycodes.registerCallback callback, params KeyCode[] keys)
 {
     keycodes.registerKeyComb(new List <KeyCode>(keys), callback, true, true);
 }
Ejemplo n.º 4
0
 public static void registerOnMultipleKeysDown(keycodes.registerCallback callback, bool repeat, params KeyCode[] keys)
 {
     keycodes.registerKeyComb(new List <KeyCode>(keys), callback, repeat, false);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// This methode can be used to register a key pressed event. You can use it like this:
 /// Input.registerOnKeyPressed(KeyCode.Space,callbackVoid);
 ///
 /// </summary>
 /// <param name="code">The keycode you want to use, for example: KeyCode.Space</param>
 /// <param name="callback">The void that you want the system to callback once the given key is pressed</param>
 public static void registerOnKeyPressed(KeyCode code, keycodes.registerCallback callback)
 {
     keycodes.registerKey(code, callback, inputTypes.pressed);
 }
Ejemplo n.º 6
0
 public keyRegister(keycodes.registerCallback callback, KeyCode key, inputTypes inputType)
 {
     this.key       = key;
     this.callback  = callback;
     this.inputType = inputType;
 }