Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

Destroy one child (of same instance) after another?

$
0
0
Hey, so the way my game works right now is that due to a certain event, a bunch of "Point"-objects spawn, and they instantly attach themselves to a "Target"-object as children. The Target has a constant timer running down, and every x seconds, it should destroy one of the Points-Children attached to it - only one at a time though! And it doesn't matter which one. Once one is destroyed, the Timer resets, and only when x seconds have passed again, it should destroy another Point-Child - until none are left. What I thought I could do in Unity is have the Target run through its own list of children, and as soon as it finds one Point-object in its Child-list, it would destroy that and reset the timer. I'm not sure how to do that though, or if it's the best solution, so any help and ideas are appreciated! Thank you very much!

Viewing all articles
Browse latest Browse all 302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>