Пример #1
0
        public void Analog_WrongBinding_Unhandled()
        {
            var inputHandler = new TestInputHandler();

            inputHandler.AddAnalogResponse
            (
                EInputKey.Interact, analogValue => EInputHandlerResult.Handled
            );

            Assert.AreEqual(inputHandler.HandleAnalogInput(EInputKey.HorizontalAnalog, 0.0f), EInputHandlerResult.Unhandled);
            inputHandler.ClearResponses();
        }
Пример #2
0
        public void Analog_BindingHandles_Handled()
        {
            var             inputHandler     = new TestInputHandler();
            const EInputKey expectedInputKey = EInputKey.Interact;

            inputHandler.AddAnalogResponse
            (
                expectedInputKey, analogValue => EInputHandlerResult.Handled
            );

            Assert.AreEqual(inputHandler.HandleAnalogInput(expectedInputKey, 0.0f), EInputHandlerResult.Handled);
            inputHandler.ClearResponses();
        }
Пример #3
0
        public void Analog_NoBinding_Unhandled()
        {
            var inputHandler = new TestInputHandler();

            Assert.AreEqual(inputHandler.HandleAnalogInput(EInputKey.HorizontalAnalog, 0.0f), EInputHandlerResult.Unhandled);
        }