Added keyboard input support for shooting stargates
This commit is contained in:
parent
a7d6c604d8
commit
1c4488d710
@ -1,5 +1,6 @@
|
||||
package cicaprojekt;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.event.KeyAdapter;
|
||||
import java.awt.event.KeyEvent;
|
||||
|
||||
@ -42,6 +43,18 @@ public class Control {
|
||||
case 'U' :
|
||||
game.boxJaffa();
|
||||
break;
|
||||
case 'E' :
|
||||
game.shootStargate(Color.YELLOW);
|
||||
break;
|
||||
case 'R' :
|
||||
game.shootStargate(Color.BLUE);
|
||||
break;
|
||||
case 'O' :
|
||||
game.shootStargate(Color.RED);
|
||||
break;
|
||||
case 'P' :
|
||||
game.shootStargate(Color.GREEN);
|
||||
break;
|
||||
}
|
||||
game.updateDisplay();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user