2d targetting problem

hello my friends here is my question i have enemy that i want shoot my player and i want when it shoots , the projectile go linear to my player i mean when i move my player to avoid the projectile , the projectile dont follow just go to its path linear and surely it is a 2d game i dont know how can understand you my problem

please write the code in c#

From the description, I am imagining a ‘space invader’ type of game, where the enemy shoots in a straight line, and the player moves to avoid this.

Here is a tutorial (that was converted to C# by the people at 3D Buzz, see link for more info), it is a 2D Space Shooter, but I think it will help you get started in programming. It is in C# , and there are some nice free assets also!

Download each part of the tutorial, then follow along (assets at end of list) :

http://forum.unity3d.com/threads/37093-Over-7-hours-of-Unity-Training-Videos-Download-them-now!

From this you can work out how to fire a projectile from an enemy in a straight line.