Created
September 17, 2012 05:38
-
-
Save mattcolman/3735734 to your computer and use it in GitHub Desktop.
Actor class
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
define [ | |
'caper/actor' | |
], (Actor) -> | |
class SampleActor extends Actor | |
added: (@parent, @pos) -> | |
@cnt = new Container() | |
@cnt.x = @pos.x | |
@cnt.y = @pos.y | |
@parent.addChild @cnt | |
@emit 'created' | |
removed: -> | |
@parent.removeChild @cnt | |
SampleActor |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment