Unity2D Vector based movement

Im doing turned based movement and I want the enemy Ai will move towards the player if the raycast is hit. I have the raycast down but Im having trouble with the movement. What I first do is determine what quadrant the Ai is in relative to the player being the origin then I want to determine, from the line draw between the player and the enemy, if what the x and y components.`void Behaviors(){
%|-725742806_1|%
GameObject player_tran = GameObject.Find (“player”);
%|599866151_3|%
%|-61990867_4|%

%|353236401_5|%

%|1556828891_6|%
%|1069263400_7|%
%|-1967895095_8|%
%|-892849587_9|%

%|-858783327_10|%
//2nd quad if (x is bigger than y) move (right) else move (down)
%|460537224_12|%
%|116659641_13|%
%|1531189555_14|%
%|2103839417_15|%

%|-691590645_17|%
else {
//if they are both equal random moement
%|-550679842_20|%
`

for example if in the 1st quad and the x component is bigger I want the enemy to move left otherwise down.

Not to be mean Atraveler, but this question is a mess. It’s impossible to tell what perspective your 2D game is in, or if the quadrants even affect your enemies movement… not to mention the code you posted. You need to write and reread your questions from the perspective of someone who has no clue what you’re working on.

That aside, I’d like to try helping you. Sometimes you need a little code to learn from, so see if anything in this simple enemy AI script helps you. It’s written for a 2D platformer, so I’ve limited the movement to only the x-axis.

If player is near to enemy:

// Set moveSpeed
float moveSpeed = 2.0f;

// Get the direction the enemy should move
Vector2 direction = player.transform.position - enemy.transform.position;

// Normalize the direction
direction.Normalize ();

// Set enemy's x-velocity to direction.x * moveSpeed
enemy.GetComponent<Rigidbody2D> ().velocity = new Vector2(direction.x * moveSpeed, this.GetComponent<Rigidbody2D> ().velocity.y);

This script would most likely be attached to your enemy object soenemy.transform would be this.transform.

Also, this is a physics based solution; If quadrants really are crucial to your game design, you’ll have to improve your question so the community can better understand your issue/game.