When last laser or enemy hit the player , the health remains the same

When last laser or enemy hit the player, the health remains the same because at last the player game object is being destroyed and the gethealth() function not able to get the health after player object is being destroyed.
Any suggestions?

Hi Pulkit,

Check if your collision method gets called. Then check if gethealth get called.

Privacy & Terms