Created
November 6, 2012 01:59
-
-
Save alamboley/4022031 to your computer and use it in GitHub Desktop.
How to destroy objects (Citrus Engine recipe)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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