royibernthal Posted May 7, 2014 Share Posted May 7, 2014 When kill() is called in an object that for instance extends Sprite, should I manually null custom variables I added to it? If so, is there a way to override the kill function - nulling the object then calling super.kill()? Or is there some kind of function call when an object is killed? (e.g. onKill()) Link to comment Share on other sites More sharing options...
stasuss Posted May 7, 2014 Share Posted May 7, 2014 There is Sprite.events.onKilled signal. But take note that Kill() does not removes the Sprite. It just sets its exists, alive and visible variables to 'false'. To completely remove the Sprite use destroy(). Link to comment Share on other sites More sharing options...
royibernthal Posted May 7, 2014 Author Share Posted May 7, 2014 I understand, so is there an onDestroy signal as well? Link to comment Share on other sites More sharing options...
Recommended Posts