Created
February 25, 2013 23:03
-
-
Save jdoig/5034147 to your computer and use it in GitHub Desktop.
A Mario sprite animated using game{closure} and coffeescript
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
`import ui.SpriteView as SpriteView;` | |
class Mario extends GC.Application | |
initUI: -> | |
sprite = new SpriteView({ | |
superview: @.view | |
x: 100 | |
y: 100 | |
width: 23 | |
height: 29 | |
url: "resources/images/mario/mario" | |
defaultAnimation: "run"}) | |
sprite.startAnimation "run" | |
`exports = Mario` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment