|
|
@ -44,7 +44,7 @@ public class EgoController extends ObjectController { |
|
|
|
|
|
|
|
/** |
|
|
|
* moves ego up by {@link SpaceInvadersLevel#EGOSPEED}. |
|
|
|
* @param kc KeyEvent to process |
|
|
|
* @param kc KeyEvent to process (ignored) |
|
|
|
* @param ego the ego object |
|
|
|
*/ |
|
|
|
public void onUp(KeyEvent kc, GameObject ego) { |
|
|
@ -54,7 +54,7 @@ public class EgoController extends ObjectController { |
|
|
|
|
|
|
|
/** |
|
|
|
* moves ego down by {@link SpaceInvadersLevel#EGOSPEED}. |
|
|
|
* @param kc KeyEvent to process |
|
|
|
* @param kc KeyEvent to process (ignored) |
|
|
|
* @param ego the ego object |
|
|
|
*/ |
|
|
|
public void onDown(KeyEvent kc, GameObject ego) { |
|
|
@ -64,7 +64,7 @@ public class EgoController extends ObjectController { |
|
|
|
|
|
|
|
/** |
|
|
|
* moves ego left by {@link SpaceInvadersLevel#EGOSPEED}. |
|
|
|
* @param kc KeyEvent to process |
|
|
|
* @param kc KeyEvent to process (ignored) |
|
|
|
* @param ego the ego object |
|
|
|
*/ |
|
|
|
public void onLeft(KeyEvent kc, GameObject ego) { |
|
|
@ -74,7 +74,7 @@ public class EgoController extends ObjectController { |
|
|
|
|
|
|
|
/** |
|
|
|
* moves ego right by {@link SpaceInvadersLevel#EGOSPEED}. |
|
|
|
* @param kc KeyEvent to process |
|
|
|
* @param kc KeyEvent to process (ignored) |
|
|
|
* @param ego the ego object |
|
|
|
*/ |
|
|
|
public void onRight(KeyEvent kc, GameObject ego) { |
|
|
@ -82,6 +82,11 @@ public class EgoController extends ObjectController { |
|
|
|
ego.setVX(SpaceInvadersLevel.EGOSPEED); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* sets speed to 0.0 |
|
|
|
* @param kc KeyEvent to process (ignored) |
|
|
|
* @param ego the ego object |
|
|
|
*/ |
|
|
|
public void onStop(KeyEvent kc, GameObject ego) { |
|
|
|
ego.setVY(0.0); |
|
|
|
ego.setVX(0.0); |
|
|
|