Here is my version of the rail shooter. I preferred to keep using the waypoint script for the ship and added another one for the enemies. While I did not have as much control this way, it was far quicker to implement. I also added a count of how many enemies are still alive. I added a end menu screen that gives you the option to restart or end the game, however this only works on the PC build and I’m not sure ho to do this in WebGL. I wanted to carry over the score and enemy ships destroyed to the end scene, but that would probably require extracting the scorekeeping to its own class and rewriting the scoreboard class.
Some bugs I’ve noticed:
The ship remains even after the explosion.
Quit doesn’t work on WebGL. (Application.Quit)
It must be running in full screen to see the menu system correctly.
You may not actually be able to defeat all enemies.
http://www.sharemygame.com/share/f5208344-d517-4927-aaf2-3a0c39fbbf96