Download

Delimited destroy. How?

Hi everyone. There are Player there are Enemies. The Player kills enemies and their number is recorded in the account, but the enemies that the Player did not kill die themselves over time and also get into the account. How to avoid it?

I’m afraid no one can give you a direct answer as this is a very project specific problem. You can solve this in a million ways. For example, using if statements, having separate functions for kill and destroy, etc…

Thank you man for the review. The issue is solved elementary. Overlap with Destroy (), which should not replenish the score, resets the" cost " of the enemy and 0 is written to the score.