I'm trying my best to make a simple "tower-defense" game on my own (both to learn SpriteKit and get my feet wet in game development in general).
I've got most of the game working, but my trouble is when it comes to the tower "shooting" at the enemies that walk across the screen.
I'm not quite sure how to go about moving the tower "bullets" to the enemy. The enemy itself moves statically, point to point, until it hits an endpoint where it dies.
However, the bullet needs to dynamically shift it's "path" so I can't use the moveTo(x: , y:) method to move it, or it looks silly (the bullet will move in a straight line to where the enemy was upon the bullet's initialization).
I'm not sure if what I need to do is implement paths (i.e. CGPath's) because frankly, I can't quite get a grasp of what a CGPath is. So here I'm kind of stuck as to the direction to go in.
Is there a simple function that will allow a sprite to move or 'follow' another sprite? (In which case when they collide I can simply delete the bullet).