I created an enemy to attack a player, this enemy has a gun. I want when this gun shot, the shot goes to direction of player. I can instantiate but can't change direction bullet to attack my player in his position.

how can I do this ?

I'm trying this.

public class EnemyShotGun : MonoBehaviour {

     public GameObject[] gun; //gun attack player
     public GameObject prefabShot; //shot
     public float enemyShotSpeed;
     private float delayAttack; 
     public float timeAttack; 

     //player
     private Transform player;

     // Use this for initialization
     void Start () {
         player = GameObject.FindGameObjectWithTag("AirPlane").transform;
     }

     // Update is called once per frame
     void Update () {
         delayAttack += Time.deltaTime;
         if (delayAttack &gt;= timeAttack){            
             for(int x = 0; x &lt; gun.Length; x++){
                 GameObject shot = Instantiate(prefabShot, gun[x].transform.position, Quaternion.identity) as GameObject;
                 shot.rigidbody2D.AddRelativeForce(new Vector2(0, -500)); 
                 shot.transform.position = player.position; //bullet goes to player position
             }                        
             delayAttack = 0;
         }

     }
 }



Question: When are we first informed about Gerry Lane's profession?
Answer: No, the scene when his daughter mentions him doing pancakes all the time. I think he replied, I've left my old job/or retired. Also the daughter asked him what was Martial Law, which tells us that he was former military or in some Defence organization.