- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
@Override
public void keyPressed(KeyEvent e)
{
if (e.getKeyCode() == KeyEvent.VK_LEFT)
move(-deltaX, 0);
else if (e.getKeyCode() == KeyEvent.VK_RIGHT)
move(deltaX, 0);
else if (e.getKeyCode() == KeyEvent.VK_UP)
move(0, -deltaY);
else if (e.getKeyCode() == KeyEvent.VK_DOWN)
move(0, deltaY);
}