private void OnInputMovement(InputAction.CallbackContext context) { Vector2 movement = context.ReadValue <Vector2>(); //Debug.Log($"{index}: Move {movement}"); OnMove?.Invoke(movement); OnMoveHorizontal?.Invoke(movement.x); OnMoveVertical?.Invoke(movement.y); }
private void UpdateMovementAxis() { OnRotate?.Invoke(new Vector3( Input.GetAxisRaw(xRotAxisName), Input.GetAxisRaw(yRotAxisName), Input.GetAxisRaw(zRotAxisName) )); OnMoveBackward?.Invoke(Input.GetAxis(backwardAxisName)); OnMoveVertical?.Invoke(Input.GetAxis(verticalAxisName)); OnMoveSideways?.Invoke(Input.GetAxis(sidewaysAxisName)); OnMoveForward?.Invoke(Input.GetAxis(forwardAxisName)); OnBoost?.Invoke(Input.GetAxis(boostAxisName)); }