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:
Fan-Wu Yang
2017-07-15 20:40:23 +12:00
parent 054816c15a
commit f9b2a62f8d
11 changed files with 245 additions and 23 deletions
@@ -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() {
}
}