Esempio n. 1
0
    public IEnumerator PlayerInputShouldReturnsTrueWhenPress(Button button)
    {
        playerInput.AssignJoystick(_1);

        inputMock.GetButton(button.GetInputName(_1)).Returns(true);

        yield return(null);

        var buttonFromPlayer = playerInput.ButtonIsDown(button);

        buttonFromPlayer.Should().BeTrue();
    }
Esempio n. 2
0
 public bool ButtonIsDown(JoystickButton button) =>
 input.GetButton(button.GetInputName(JoystickNumber));