Skip to main content
1 of 2
Bálint
  • 15.1k
  • 2
  • 38
  • 57

If simply not drawing it when its health is 0 isn't enough, you can just use the delete keyword to remove it from memory completely:

delete boss;

This won't actually remove the object from memory immediately, but unless you have multiple references to it, it will ready it for garbage collection.

Bálint
  • 15.1k
  • 2
  • 38
  • 57