Created
March 24, 2012 13:01
-
-
Save jcole/2182511 to your computer and use it in GitHub Desktop.
Example of removing an object from EaselBox
This file contains 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
# Example for how to remove an object: | |
obj = @world.addEntity( type: 'dynamic',radiusPixels: 30) # first, create the object | |
@world.removeEntity(obj) # now, remove it | |
# What "removeEntity" does: | |
removeEntity: (object) -> | |
@box2dWorld.DestroyBody(object.body) | |
@easelStage.removeChild(object.easelObj) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment