Browse Source

Hausaufgabe 9

main
Manu 2 years ago
parent
commit
aa642b5a49
  1. 2
      GameProject/src/base/BreakoutGame.java
  2. 2
      GameProject/src/playground/BreakoutLevel1.java

2
GameProject/src/base/BreakoutGame.java

@ -18,7 +18,7 @@ public class BreakoutGame extends GameLoop {
@Override @Override
public void defineLevels() { public void defineLevels() {
this.resetLevels();// removes Level1 added by superclass constructor this.resetLevels();// removes Level1 added by superclass constructor
this.addLevel(new BreakoutLevel1());// this.addLevel(new BreakoutLevel1()); // FIXME add this as soon as your level exists
this.addLevel(new BreakoutLevel2());// this.addLevel(new BreakoutLevel1()); // FIXME add this as soon as your level exists
} }
/** /**

2
GameProject/src/playground/BreakoutLevel1.java

@ -42,7 +42,7 @@ public class BreakoutLevel1 extends BreakoutLevelBase{
*/ */
@Override @Override
protected GameObject createEgoObject() { protected GameObject createEgoObject() {
RectObject ego = new RectObject("ego", this, 350, 550, 0, 0, 80, 10, Color.blue);
RectObject ego = new RectObject("ego", this, 350, 550, 0, 0, 60, 10, Color.blue);
this.addObject(ego); this.addObject(ego);
ego.addController(new EgoController(ego.getWidth(),ego.getHeight())); ego.addController(new EgoController(ego.getWidth(),ego.getHeight()));
ego.addCollider(new collider.RectCollider(ego.getId(),ego,ego.getWidth(),ego.getHeight())); ego.addCollider(new collider.RectCollider(ego.getId(),ego,ego.getWidth(),ego.getHeight()));

Loading…
Cancel
Save