Question by
irattob · Apr 23, 2020 at 09:41 AM ·
space shooter
Space shooter - ignore multiple bolts on enemy
Hi ! I'm new to Unity and created the space shooter game using the tutorial provided on the website.
Now I added some additional stuff like a power up system. If the player collects power ups, he can shoot up to 7 bolts at the same time. If the 7 bolts hit an enemy at the same time, the points from defeating the enemy get added up 7 times, although I destroy the enemy game object and I just want to add up the points one time.
How can I solve this problem? Is there a way to ignore OnTriggerEnter if the game object is destroyed soon? (I assume it isn't destroyed at that moment yet)
Comment