|
@ -22,11 +22,19 @@ public class Paddle extends Rectangle { |
|
|
} else if (id == 2) { |
|
|
} else if (id == 2) { |
|
|
y2 = y; |
|
|
y2 = y; |
|
|
} |
|
|
} |
|
|
this.width = width; |
|
|
|
|
|
this.height = height; |
|
|
|
|
|
|
|
|
PaddleWidth(width); |
|
|
|
|
|
PaddleHeight(height); |
|
|
this.id = id; |
|
|
this.id = id; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void PaddleHeight(int height) { |
|
|
|
|
|
this.height = height; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void PaddleWidth(int width) { |
|
|
|
|
|
this.width = width; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void released(KeyEvent e) { |
|
|
public void released(KeyEvent e) { |
|
|
if (e.getKeyCode() == KeyEvent.VK_W) { |
|
|
if (e.getKeyCode() == KeyEvent.VK_W) { |
|
|