The Controller now takes in key presses.
- Each key is now registered in an Abstract Factory which takes in an action to perform. - Comments are added behind each function in to give some indication of how it could be extended/modified in the future. #story[1006]
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package seng302.gameController.Keys;
|
||||
|
||||
import javafx.scene.input.KeyCode;
|
||||
|
||||
/**
|
||||
* Key to send downwind packet to server
|
||||
*/
|
||||
public class DownWindKey extends ControlKey {
|
||||
|
||||
/**
|
||||
* Constructor for Control
|
||||
*
|
||||
* @param name name of the key
|
||||
* @param keyCode key code for the key
|
||||
*/
|
||||
public DownWindKey(String name, KeyCode keyCode) {
|
||||
super(name, keyCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAction() {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user