Browse Source

Hausaufgabe 7

createEgoObject und createBall
master
Alisa95 3 years ago
parent
commit
1ce00a1605
  1. 49
      spaceinvaders/GameProject/log/log4j.log
  2. 59
      spaceinvaders/GameProject/src/playground/BreakoutLevel1.java

49
spaceinvaders/GameProject/log/log4j.log

@ -1361,3 +1361,52 @@
2022-05-30 11:14:29,079 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-05-30 11:14:31,658 INFO playground.LevelMovingObjects - ego hit a letal RectObject. Game ends NOW
2022-05-30 11:14:31,659 INFO base.GameLoop - Game ends. Bye.
2022-06-02 08:19:10,835 INFO playground.SpaceInvadersLevel - PREPARE
2022-06-02 08:19:10,885 INFO playground.Animation - img added ./video/sweetAlien0.png
2022-06-02 08:19:10,890 INFO playground.Animation - img added ./video/sweetAlien1.png
2022-06-02 08:19:10,892 INFO playground.Animation - img added ./video/sweetAlien2.png
2022-06-02 08:19:10,894 INFO playground.Animation - img added ./video/sweetAlien3.png
2022-06-02 08:19:10,898 INFO playground.Animation - img added ./video/sweetAlien4.png
2022-06-02 08:19:10,900 INFO playground.Animation - img added ./video/sweetAlien5.png
2022-06-02 08:19:10,903 INFO playground.Animation - img added ./video/sweetAlien6.png
2022-06-02 08:19:10,905 INFO playground.Animation - img added ./video/sweetAlien7.png
2022-06-02 08:19:10,916 INFO playground.Animation - img added ./video/heart0.png
2022-06-02 08:19:10,918 INFO playground.Animation - img added ./video/heart1.png
2022-06-02 08:19:10,925 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-06-02 08:19:19,686 INFO playground.LevelMovingObjects - ego hit a letal RectObject. Game ends NOW
2022-06-02 08:20:21,338 INFO playground.SpaceInvadersLevel - PREPARE
2022-06-02 08:20:21,375 INFO playground.Animation - img added ./video/sweetAlien0.png
2022-06-02 08:20:21,379 INFO playground.Animation - img added ./video/sweetAlien1.png
2022-06-02 08:20:21,380 INFO playground.Animation - img added ./video/sweetAlien2.png
2022-06-02 08:20:21,382 INFO playground.Animation - img added ./video/sweetAlien3.png
2022-06-02 08:20:21,385 INFO playground.Animation - img added ./video/sweetAlien4.png
2022-06-02 08:20:21,388 INFO playground.Animation - img added ./video/sweetAlien5.png
2022-06-02 08:20:21,389 INFO playground.Animation - img added ./video/sweetAlien6.png
2022-06-02 08:20:21,391 INFO playground.Animation - img added ./video/sweetAlien7.png
2022-06-02 08:20:21,398 INFO playground.Animation - img added ./video/heart0.png
2022-06-02 08:20:21,400 INFO playground.Animation - img added ./video/heart1.png
2022-06-02 08:20:21,410 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-06-02 09:09:25,208 INFO playground.SpaceInvadersLevel - PREPARE
2022-06-02 09:09:25,248 INFO playground.Animation - img added ./video/sweetAlien0.png
2022-06-02 09:09:25,253 INFO playground.Animation - img added ./video/sweetAlien1.png
2022-06-02 09:09:25,254 INFO playground.Animation - img added ./video/sweetAlien2.png
2022-06-02 09:09:25,256 INFO playground.Animation - img added ./video/sweetAlien3.png
2022-06-02 09:09:25,259 INFO playground.Animation - img added ./video/sweetAlien4.png
2022-06-02 09:09:25,262 INFO playground.Animation - img added ./video/sweetAlien5.png
2022-06-02 09:09:25,264 INFO playground.Animation - img added ./video/sweetAlien6.png
2022-06-02 09:09:25,266 INFO playground.Animation - img added ./video/sweetAlien7.png
2022-06-02 09:09:25,274 INFO playground.Animation - img added ./video/heart0.png
2022-06-02 09:09:25,275 INFO playground.Animation - img added ./video/heart1.png
2022-06-02 09:09:25,283 INFO playground.SpaceInvadersLevel - HIGHSCORE17200
2022-06-02 09:09:43,373 INFO playground.SpaceInvadersLevel - PREPARE
2022-06-02 09:09:43,407 INFO playground.Animation - img added ./video/sweetAlien0.png
2022-06-02 09:09:43,411 INFO playground.Animation - img added ./video/sweetAlien1.png
2022-06-02 09:09:43,412 INFO playground.Animation - img added ./video/sweetAlien2.png
2022-06-02 09:09:43,414 INFO playground.Animation - img added ./video/sweetAlien3.png
2022-06-02 09:09:43,417 INFO playground.Animation - img added ./video/sweetAlien4.png
2022-06-02 09:09:43,419 INFO playground.Animation - img added ./video/sweetAlien5.png
2022-06-02 09:09:43,421 INFO playground.Animation - img added ./video/sweetAlien6.png
2022-06-02 09:09:43,423 INFO playground.Animation - img added ./video/sweetAlien7.png
2022-06-02 09:09:43,428 INFO playground.Animation - img added ./video/heart0.png
2022-06-02 09:09:43,430 INFO playground.Animation - img added ./video/heart1.png
2022-06-02 09:09:43,441 INFO playground.SpaceInvadersLevel - HIGHSCORE17200

59
spaceinvaders/GameProject/src/playground/BreakoutLevel1.java

@ -0,0 +1,59 @@
package playground;
import java.awt.Color;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import controller.*;
import collider.RectCollider;
import gameobjects.FallingStar;
import gameobjects.GameObject;
import gameobjects.RectObject;
public class BreakoutLevel1 extends BreakoutLevelBase {
private static Logger logger = LogManager.getLogger(BreakoutLevel1.class);
@Override
protected void actionIfBallHitsBrick(GameObject ball, GameObject brick) {
// TODO Auto-generated method stub
}
@Override
protected void actionIfBallHitsEgo(GameObject ball, GameObject ego) {
// TODO Auto-generated method stub
}
@Override
protected GameObject createEgoObject() {
RectObject blueBox = new RectObject("ego", this, 350, 550, 0, 0, 80, 10, Color.BLUE);
blueBox.generateColliders();
EgoController ec = new EgoController(30);
blueBox.addController(ec);
logger.info("ego created.");
return blueBox;
}
@Override
protected GameObject createBall() {
GameObject ball = new FallingStar("ball1", this, 350, 350, 120, 120, Color.RED, 5);
ball.addController(new ReboundController());
logger.info("ball created.");
return ball;
}
@Override
protected GameObject createBrick(int row, int column) {
// TODO Auto-generated method stub
return null;
}
@Override
public void prepareLevel(String level) {
// TODO Auto-generated method stub
}
}
Loading…
Cancel
Save