Skip to content

Instantly share code, notes, and snippets.

@adventureloop
Created January 30, 2013 19:11
Show Gist options
  • Save adventureloop/4675847 to your computer and use it in GitHub Desktop.
Save adventureloop/4675847 to your computer and use it in GitHub Desktop.
66 ctx.clearRect(0,0,640,400);
67
68 ctx.save();
69
70 var tmpPos = programmer.position;
71 ctx.translate(tmpPos.x,tmpPos.y);
72 programmer.draw();
73
74 ctx.restore();
75
76 ctx.strokeText("Age: " + programmer.age.toFixed(2),canvasWidth-80,20);
77 ctx.strokeText("Money: " + programmer.money.toFixed(2),canvasWidth-80,40);
78 ctx.strokeText("Energy: " + programmer.energy.toFixed(2),canvasWidth-80,60);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment