Here I made it, that the tower looks at the enemies position. When the tower looks at the enemy, a spotlight will turn on.Â
Then a bullet will be created and the bullet also looks at the enemy. The bullet will move to the enemy with a given speed in the inspector. The bullet (tower) has a reload time that is given in the inspector.
Link to script page: Github
Here I made it, that every enemy that spawns in on one of the objects. That the enemy will look for the next object it needs to go to. Then it will move to the next way point.
The enemy will keep moving with a given speed in the Inspector, until it hits the end point.
Link to script page: Github