destroy(destroyChildren, destroyTexture)
Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if presentand nulls its reference to game, freeing it up for garbage collection. If this Game Object has the Events component it will also dispatch the onDestroy event. You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you'vemore than one Game Object sharing the same BaseTexture.
Parameters
Name Type