I am planning on developing a small 2D Android and iPhone game and I need to go over a few things before I can start building.
I was wondering how to build a script in Javascript to emit a prefab within a ring-like parameter in a 2D style game. I will try to explain with images.
In this image, The green square represents the Camera’s view, and the red ring of sorts represents the parameters of which I want the enemies (those blob things) to spawn.
I need help developing a script that randomly generates a position within the parameter and places an object of choice there (to be changed in the inspector tab). I also need to have the spawn rate changeable through time, as in it spawns faster over a period of time.
If anyone can help me, it would be so great. I’m willing to go into further detail, so just ask if you need that.
Thanks.