How to convert angle and force, into force applied to X & Y

Hi, I really need some help with this one! I need to apply force to a character, but because I use my own 2D controller, not physics, I apply my forces in X & Y based on the input. However, I need to apply recoil kickback from the characters gun, in the opposite direction that the gun is facing.

I have the rotation of the transform for the gun, its calculated as per below.

    void Update ()
    {
        Vector2 mousePos = Input.mousePosition;
        Vector2 screenPos = Camera.main.ScreenToWorldPoint(new Vector3(mousePos.x, mousePos.y, transform.position.z - Camera.main.transform.position.z));
        gun.transform.rotation = Quaternion.Euler(0,0,Mathf.Atan2((screenPos.y - transform.position.y), (screenPos.x - transform.position.x)) * Mathf.Rad2Deg);
    }

So my question is, how can I translate that into a force to be applied to the X & Y of the parent object.

For example, if the angle is 45 degrees and I want to apply 20 force. How do I work out how to split that force between the X & Y coords, based on the angle above?

I think I can get the rotation to a vector using something like this:

Vector2 dir = (Vector2)(Quaternion.Euler(0,0,degree) * Vector2.right);

But its the application of force that is stumping me

Ok fixed thanks to an answer on the answers section, easy to do with:

 float xForce = force * Vector3.Dot(character.transform.up, -gun.transform.right);
float yForce = force * Vector3.Dot(character.transform.right, -gun.transform.right);