Question by
soundslikebananas · Mar 23, 2016 at 01:46 PM ·
collisiontriggercollision detectionrespawnobstacle
Trouble Respawning objects after colliding with trigger
I am trying to spawn hazard objects in my vertical scrolling game. I want to respawn when the spawner collides with the last hazard object. The objects appear on screen fine when the game starts, but nothing seems to happen when the spawner collides with the last object. I have a hazard collector at the top of the screen which sets the hazard objects inactive when a collision is detected and that is working fine.
Comment
I added a link to the picture of the code above. After adding a couple debug.Log statements it looks like it is detecting the hazard objects but does not recognize the last hazard object as the last hazard.