I am programming a game and need to execute two keyEvents before fire();
For now I have done this to test:
if (key == KeyEvent.VK_SPACE) {
fire();
}
What I need is:
if (key == KeyEvent.VK_DOWN) && (key == KeyEvent.VK_UP) {
fire();
}
The problem is, they need to be pressed in this sequence: First down, then up and so fire, but I don't know how can I do it.