Skip to content

Instantly share code, notes, and snippets.

@chrislloyd
Forked from whalec/Node.coffee
Created May 28, 2010 03:56
Show Gist options
  • Save chrislloyd/416725 to your computer and use it in GitHub Desktop.
Save chrislloyd/416725 to your computer and use it in GitHub Desktop.
# Make sure that Node is %script{src'd} before Sprite
window.Node: class Node
addToStage: ->
console.log "Add node to stage"
class Sprite extends Node
constructor: (url) ->
@url: url
@chrislloyd
Copy link
Author

It's also pretty good practice to have a task which concatenates your source files (beforee the coffee -c command is run) so you don't have to worry about scope too much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment