Skip to content

Instantly share code, notes, and snippets.

@jdoig
Created February 25, 2013 23:03
Show Gist options
  • Save jdoig/5034147 to your computer and use it in GitHub Desktop.
Save jdoig/5034147 to your computer and use it in GitHub Desktop.
A Mario sprite animated using game{closure} and coffeescript
`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