Skip to content

Instantly share code, notes, and snippets.

@alamboley
Created November 6, 2012 01:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alamboley/4022031 to your computer and use it in GitHub Desktop.
Save alamboley/4022031 to your computer and use it in GitHub Desktop.
How to destroy objects (Citrus Engine recipe)
// Inside a class which extends CitrusObject e.g. CitrusSprite, APhysicsObjects...
kill = true;
// If you have an access to the variable of the object :
hero.kill = true;
// Or within a State class (the previous code works too) :
remove(hero);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment