I have a problem and the problem is that after an enemy dies, it adds double the scorePerHit value and I found out that it’s because that we have two laser guns shooting. I disable one of them and it works correctly. I wonder how can I fix this issue?
Hi,
Declare a bool at the top of your class. Name it isDead
or something like that. Set it to false. When the enemy dies, set the variable to true. Wrap your code in an if-statement checking if the variable is true or false.
1 Like
thanks!
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.