Added keyboard input support for shooting stargates
This commit is contained in:
		@@ -1,5 +1,6 @@
 | 
				
			|||||||
package cicaprojekt;
 | 
					package cicaprojekt;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.awt.*;
 | 
				
			||||||
import java.awt.event.KeyAdapter;
 | 
					import java.awt.event.KeyAdapter;
 | 
				
			||||||
import java.awt.event.KeyEvent;
 | 
					import java.awt.event.KeyEvent;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -42,6 +43,18 @@ public class Control {
 | 
				
			|||||||
                case 'U' :
 | 
					                case 'U' :
 | 
				
			||||||
                    game.boxJaffa();
 | 
					                    game.boxJaffa();
 | 
				
			||||||
                    break;
 | 
					                    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();
 | 
					            game.updateDisplay();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user