public InputResult OnKeyUp(UserInputKey keyCode) { if (!IsHandlerEnabled) { return(InputResult.Continue); } InputResult inputResult; if (_cameraHeightKeys.CameraUpKeys.Contains(keyCode)) { _isCameraMovingUp = false; inputResult = InputResult.StopProcessingEvents | InputResult.HideFromOtherApplications; } else if (_cameraHeightKeys.CameraDownKeys.Contains(keyCode)) { _isCameraMovingDown = false; inputResult = InputResult.StopProcessingEvents | InputResult.HideFromOtherApplications; } else { inputResult = InputResult.Continue; } if (_actionLoopService.IsLoopingAction && !(_isCameraMovingDown || _isCameraMovingUp)) { _actionLoopService.StopLoopingAction(); } return(inputResult); }
public InputResult OnKeyUp(UserInputKey keyCode) { if (!IsHandlerEnabled || !_isCameraMovingInAnyDirection) { return(InputResult.Continue); } if (_cameraMovementKeys.CameraForwardKeys.Contains(keyCode)) { _isCameraMovingUp = false; } else if (_cameraMovementKeys.CameraBackKeys.Contains(keyCode)) { _isCameraMovingBack = false; } else if (_cameraMovementKeys.CameraLeftKeys.Contains(keyCode)) { _isCameraMovingLeft = false; } else if (_cameraMovementKeys.CameraRightKeys.Contains(keyCode)) { _isCameraMovingRight = false; } if (!(_isCameraMovingUp || _isCameraMovingBack || _isCameraMovingLeft || _isCameraMovingRight)) { _isCameraMovingInAnyDirection = false; _actionLoopService.StopLoopingAction(); } return(InputResult.Continue); }