Skip to content

Instantly share code, notes, and snippets.

@mikeemoo
Created August 30, 2012 09:41
Show Gist options
  • Select an option

  • Save mikeemoo/3524943 to your computer and use it in GitHub Desktop.

Select an option

Save mikeemoo/3524943 to your computer and use it in GitHub Desktop.
class Player extends Actor
{
function setRenderer(IPlayerRenderer) {}
function render(game, delta) {
this.renderer.render(this);
}
}
class CanvasPlayerRenderer extends CanvasRenderer implements IPlayerRenderer
{
function render (player) {
var ctx = Canvas::getCtx();
// draw shit
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment