Feature/test game sprint1

# Conflicts:
#	control/GameControl.java
#	main/Main.java
#	main/Window.java

Sprint 1 finished
This commit is contained in:
jancoow
2015-05-28 07:37:59 +02:00
19 changed files with 557 additions and 98 deletions
+11 -5
View File
@@ -11,23 +11,29 @@ public class GameControl implements JoystickListener, ButtonListener{
GameModel model;
GameView view;
GameStateManager gsm;
public GameControl(GameModel model, GameView view)
public GameControl(GameModel model, GameView view,GameStateManager gsm)
{
this.model = model;
this.view = view;
this.gsm = gsm;
}
@Override
public void buttonPressed(ButtonEvent e) {
System.out.println(e.getButton().getButtonID());
public void buttonPressed(ButtonEvent e) {
// System.out.println("Game control, button pressed: "+e.getButton().getButtonID());
gsm.currentState.buttonPressed(e);
}
@Override
public void buttonReleased(ButtonEvent e) {}
public void buttonReleased(ButtonEvent e) {
// System.out.println("Game control, button released: "+e.getButton().getButtonID());
gsm.currentState.buttonReleased(e);
}
@Override
public void onJoystickMoved(JoystickEvent e) {
gsm.currentState.onJoystickMoved(e);
}
}