public
anonymous / render.java
Created

Render Method

  • Download Gist
render.java
Java
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
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);
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.