Unlimited-Development-Works / Root-Maneuver

1 stars 0 forks source link

Spawn Nutrients #17

Open fierydrake opened 1 year ago

fierydrake commented 1 year ago

Fixed number of nutrients on screen - when one is collected then a new one will spawn and fade in.

fierydrake commented 1 year ago

Initial implementation will spawn a given prefab in a randomly selected area within a defined width/height of the spawn area position. You can set the delay between spawns and provide a list of Tags to avoid. When avoiding it will make sure the spawn point is more than the given avoidRadius away from the position of any GameObject with one of the listed Tags.

If necessary we can enhance the avoidance to take account of the size of the object by checking colliders / bounding area or perhaps add a component to specify the avoidance distance per object. But hopefully a global radius will be good enough.