Skip to content

Instantly share code, notes, and snippets.

Created June 27, 2012 04:24
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anonymous/3001434 to your computer and use it in GitHub Desktop.
Render Method
public void render(Graphics2D g, float interpolation){
gBuffer.clearRect(0,0,900, 600);
gBuffer.setColor(Color.gray);
gBuffer.fillRect(448,0, 5,500);
gBuffer.setColor(Color.black);
gBuffer.fillRect(0,500,900,5);
gBuffer.drawString("Player 1: " + score1, 10 , 535);
gBuffer.drawString("Player 2: " + score2, 760, 535);
puck.drawPuck(interpolation);
p1.drawPaddle(interpolation);
p2.drawPaddle(interpolation);
goal1.drawGoal();
goal2.drawGoal();
g.drawImage(buffer,0,0,null);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment