Added keyboard input support for shooting stargates
This commit is contained in:
		@@ -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();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user