using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EnemyScript : MonoBehaviour {
	public Rigidbody2D myRb;
	public float speed = 5f;


	void Update () {

		Vector2 centre = new Vector2 (0f - transform.position.x, 0f - this.transform.position.y);
		myRb.velocity = centre.normalized * speed;
		transform.up = myRb.velocity;

	}
}
