public void ReceivesSecondaryPowerButton_CompanionSet_DoesNotUsePower() { var companionHandler = new CompanionInputHandler(_companionSet); companionHandler.HandleButtonInput(EInputKey.SecondaryPower, false); Assert.IsNull(_companionSet.UseCompanionPowerSlotResult); }
public void ReceivesSecondaryDialogueButton_NoCompanionSet_DoesNotUseSecondaryDialogue() { var companionHandler = new CompanionInputHandler(null); companionHandler.HandleButtonInput(EInputKey.SecondaryDialogue, false); Assert.IsNull(_companionSet.RequestCompanionDialogueSlotResult); }
public void ReceivesSecondaryPowerButton_CompanionSet_UsesPower() { var companionHandler = new CompanionInputHandler(_companionSet); companionHandler.HandleButtonInput(EInputKey.SecondaryPower, true); Assert.AreEqual(ECompanionSlot.Secondary, _companionSet.UseCompanionPowerSlotResult); }
public void ReceivesSecondaryDialogueButton_CompanionSet_UsesDialogue() { var companionHandler = new CompanionInputHandler(_companionSet); companionHandler.HandleButtonInput(EInputKey.SecondaryDialogue, true); Assert.AreEqual(ECompanionSlot.Secondary, _companionSet.RequestCompanionDialogueSlotResult); }
private void RegisterForInput(CharacterComponent inCharacter) { _locomotionInputHandler = new LocomotionInputHandler(Info.Owner.GetComponent <IMovementInterface>(), inCharacter.ActiveController.GetComponent <IPlayerCameraInterface>(), Info.Owner.GetComponent <IHeldItemInterface>()); _interactionInputHandler = new InteractionInputHandler(Info.Owner.GetComponent <IInteractionInterface>()); _pauseInputHandler = new PauseInputHandler(GameServiceProvider.CurrentInstance.GetService <ITimeServiceInterface>()); _companionInputHandler = new CompanionInputHandler(Info.Owner.GetComponent <ICompanionSetInterface>()); _gadgetInputHandler = new GadgetInputHandler(Info.Owner.GetComponent <IGadgetSetInterface>()); _inputBinderInterface = Info.Owner.GetComponent <IInputBinderInterface>(); if (_inputBinderInterface != null) { _inputBinderInterface.RegisterInputHandler(_gadgetInputHandler); _inputBinderInterface.RegisterInputHandler(_companionInputHandler); _inputBinderInterface.RegisterInputHandler(_pauseInputHandler); _inputBinderInterface.RegisterInputHandler(_interactionInputHandler); _inputBinderInterface.RegisterInputHandler(_locomotionInputHandler); } }
public void ReceivesPrimaryPowerButton_NoCompanionSet_ReturnsUnhandled() { var companionHandler = new CompanionInputHandler(null); Assert.AreEqual(EInputHandlerResult.Unhandled, companionHandler.HandleButtonInput(EInputKey.PrimaryPower, true)); }
public void ReceivesPrimaryPowerButton_CompanionSet_False_ReturnsHandled() { var companionHandler = new CompanionInputHandler(_companionSet); Assert.AreEqual(EInputHandlerResult.Handled, companionHandler.HandleButtonInput(EInputKey.PrimaryPower, false)); }
public void ReceivesSecondaryDialogueButton_NoCompanionSet_ReturnsUnhandled() { var companionHandler = new CompanionInputHandler(null); Assert.AreEqual(EInputHandlerResult.Unhandled, companionHandler.HandleButtonInput(EInputKey.SecondaryDialogue, true)); }
public void ReceivesSecondaryDialogueButton_CompanionSet_False_ReturnsHandled() { var companionHandler = new CompanionInputHandler(_companionSet); Assert.AreEqual(EInputHandlerResult.Handled, companionHandler.HandleButtonInput(EInputKey.SecondaryDialogue, false)); }
public void ReceivesPrimaryDialogueButton_CompanionSet_ReturnsHandled() { var companionHandler = new CompanionInputHandler(_companionSet); Assert.AreEqual(EInputHandlerResult.Handled, companionHandler.HandleButtonInput(EInputKey.PrimaryDialogue, true)); }
public void ReceivesSecondaryPowerButton_CompanionSet_ReturnsHandled() { var companionHandler = new CompanionInputHandler(_companionSet); Assert.AreEqual(EInputHandlerResult.Handled, companionHandler.HandleButtonInput(EInputKey.SecondaryPower, true)); }