Пример #1
0
 public void checkKeyboardInput(QTEKey key)
 {
     if (Input.GetKeyDown(key.keyboardKey))
     {
         keys.Remove(key);
     }
     if (Input.GetKeyUp(key.keyboardKey) && eventData.pressType == QTEPressType.Simultaneously)
     {
         keys.Add(key);
     }
 }
Пример #2
0
 public void checkGamepadInput(QTEKey key)
 {
     if (Input.GetKeyDown(key.gamepadXBOXKey) || Input.GetKeyDown(key.gamepadDualShockKey))
     {
         keys.Remove(key);
     }
     if ((Input.GetKeyUp(key.gamepadXBOXKey) ||
          Input.GetKeyUp(key.gamepadDualShockKey)) &&
         eventData.pressType == QTEPressType.Simultaneously)
     {
         keys.Add(key);
     }
 }
Пример #3
0
    public void checkKeyboardInput(QTEKey key)
    {
        var inputType = Keyboard.current;

        if (inputType != null)
        {
            if (inputType[key.keyboardKey].wasPressedThisFrame)
            {
                keys.Remove(key);
            }
            if (inputType[key.keyboardKey].wasReleasedThisFrame &&
                eventData.pressType == QTEPressType.Simultaneously)
            {
                keys.Add(key);
            }
        }
    }
Пример #4
0
    public void checkGamepadInput(QTEKey key)
    {
        var inputType = Gamepad.current;

        if (inputType != null)
        {
            if (inputType[key.gamepadXBOXKey].wasPressedThisFrame ||
                inputType[key.gamepadDualShockKey].wasPressedThisFrame)
            {
                keys.Remove(key);
            }
            if ((inputType[key.gamepadXBOXKey].wasReleasedThisFrame ||
                 inputType[key.gamepadDualShockKey].wasReleasedThisFrame) &&
                eventData.pressType == QTEPressType.Simultaneously)
            {
                keys.Add(key);
            }
        }
    }