Blog comment #2 Samuel Karabetian

https://samuelkarabetiansgameblog.wordpress.com/2018/02/15/enemy-and-obstacle-spawning/

Hello Samuel! Thanks for the explanation of the obstacle spawner! The article wrote in a clear structure and told me details of what you did which would be easy for me to simulate. I love the inspector design you made! I have totally no idea how to modify the pattern of the inspector, though I modify the properties of GameObject there as well. It will be great to have a header and slider to make the architecture neat and save coders some time.
The script definitely works well in your game. As the recommendation, if you want to control the properties of each GameObject more precise, you could have some self-designed class which contains a GameObject and other features like a Vector2 for the spawning position, a float for spawning delay and maybe an enum to indicate what enemy type it is. The Spawn controller holds a list of this new class and generates objects over game time. However, it’s kind of a level generator, if the game requires a random endless spawning pattern, the way you did is perfect.
—-Hangning Zhang(Group Devourer)

About Hangning Zhang

2017 Programming