Browse Source

HA09 bis Aufgabe 4,5 :D

master
Jannik Niebuhr 2 years ago
parent
commit
087ed731b8
  1. BIN
      spaceinvaders/GameProject/bin/base/BreakoutGame.class
  2. 221
      spaceinvaders/GameProject/log/log4j.log
  3. 43
      spaceinvaders/GameProject/src/playground/BreakoutLevel3.java

BIN
spaceinvaders/GameProject/bin/base/BreakoutGame.class

221
spaceinvaders/GameProject/log/log4j.log

@ -3090,3 +3090,224 @@
2022-06-17 17:18:04,605 INFO playground.BreakoutLevel2 - ego created.
2022-06-17 17:18:04,607 INFO playground.BreakoutLevel2 - ball created.
2022-06-17 17:18:04,609 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-23 14:20:27,443 INFO base.GameLoop - GUI starts
2022-06-23 14:20:30,534 INFO base.GameLoop - GUI NEW
2022-06-23 14:21:15,998 INFO base.GameLoop - GUI starts
2022-06-23 14:21:18,721 INFO base.GameLoop - GUI NEW
2022-06-23 14:22:18,642 INFO base.GameLoop - GUI starts
2022-06-23 14:22:20,947 INFO base.GameLoop - GUI NEW
2022-06-23 14:22:20,969 INFO playground.BreakoutLevelBase - ego created.
2022-06-23 14:22:20,972 INFO playground.BreakoutLevelBase - ball created.
2022-06-23 14:22:20,973 INFO playground.BreakoutLevelBase - level preperation succeeded.
2022-06-23 14:22:54,958 INFO base.GameLoop - GUI starts
2022-06-23 14:22:57,119 INFO base.GameLoop - GUI NEW
2022-06-23 14:22:57,143 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,145 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,146 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,147 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,148 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,149 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,149 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,150 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,151 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,152 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,153 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,154 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,155 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,155 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,157 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,158 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,158 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,159 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,160 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,160 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,161 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,162 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,163 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,164 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,165 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:22:57,168 INFO playground.BreakoutLevel2 - ego created.
2022-06-23 14:22:57,171 INFO playground.BreakoutLevel2 - ball created.
2022-06-23 14:22:57,178 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-23 14:51:37,261 INFO base.GameLoop - GUI starts
2022-06-23 14:51:40,216 INFO base.GameLoop - GUI NEW
2022-06-23 14:51:40,238 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,240 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,240 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,242 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,242 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,243 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,244 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,244 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,246 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,246 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,247 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,248 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,248 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,249 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,250 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,251 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,251 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,252 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,252 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,253 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,254 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,254 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,255 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,256 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,257 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:51:40,259 INFO playground.BreakoutLevel2 - ego created.
2022-06-23 14:51:40,262 INFO playground.BreakoutLevel2 - ball created.
2022-06-23 14:51:40,268 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-23 14:58:42,180 INFO base.GameLoop - GUI starts
2022-06-23 14:58:44,641 INFO base.GameLoop - GUI NEW
2022-06-23 14:59:43,955 INFO base.GameLoop - GUI starts
2022-06-23 14:59:47,949 INFO base.GameLoop - GUI NEW
2022-06-23 14:59:48,021 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,023 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,026 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,027 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,029 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,030 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,031 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,033 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,034 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,036 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,038 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,040 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,041 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,042 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,043 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,044 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,045 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,046 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,047 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,048 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,049 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,050 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,052 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,053 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,055 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 14:59:48,058 INFO playground.BreakoutLevel2 - ego created.
2022-06-23 14:59:48,063 INFO playground.BreakoutLevel2 - ball created.
2022-06-23 14:59:48,070 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-23 15:02:59,231 INFO base.GameLoop - GUI starts
2022-06-23 15:03:01,900 INFO base.GameLoop - GUI NEW
2022-06-23 15:03:01,924 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,925 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,926 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,927 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,928 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,929 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,929 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,930 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,931 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,932 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,933 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,934 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,934 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,935 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,936 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,936 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,937 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,937 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,938 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,939 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,939 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,940 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,941 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,941 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,942 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:03:01,945 INFO playground.BreakoutLevel2 - ego created.
2022-06-23 15:03:01,948 INFO playground.BreakoutLevel2 - ball created.
2022-06-23 15:03:01,953 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-23 15:10:48,137 INFO base.GameLoop - GUI starts
2022-06-23 15:10:51,510 INFO base.GameLoop - GUI NEW
2022-06-23 15:10:51,533 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,534 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,535 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,536 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,537 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,537 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,538 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,539 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,539 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,540 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,541 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,542 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,543 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,543 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,544 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,545 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,545 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,546 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,546 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,547 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,548 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,549 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,549 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,550 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,551 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:10:51,554 INFO playground.BreakoutLevel2 - ego created.
2022-06-23 15:10:51,557 INFO playground.BreakoutLevel2 - ball created.
2022-06-23 15:10:51,561 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-23 15:15:03,054 INFO base.GameLoop - GUI starts
2022-06-23 15:15:06,085 INFO base.GameLoop - GUI NEW
2022-06-23 15:15:06,109 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,110 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,111 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,112 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,113 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,113 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,114 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,115 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,115 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,116 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,117 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,118 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,119 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,119 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,120 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,121 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,121 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,122 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,123 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,123 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,124 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,125 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,125 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,126 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,127 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:06,130 INFO playground.BreakoutLevel2 - ego created.
2022-06-23 15:15:06,133 INFO playground.BreakoutLevel2 - ball created.
2022-06-23 15:15:06,138 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.
2022-06-23 15:15:36,033 INFO base.GameLoop - GUI starts
2022-06-23 15:15:38,758 INFO base.GameLoop - GUI NEW
2022-06-23 15:15:38,781 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,783 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,784 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,785 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,785 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,786 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,787 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,788 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,788 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,789 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,790 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,791 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,791 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,792 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,793 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,794 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,794 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,795 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,795 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,796 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,797 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,798 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,798 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,799 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,800 INFO playground.BreakoutLevel2 - brick created.
2022-06-23 15:15:38,803 INFO playground.BreakoutLevel2 - ego created.
2022-06-23 15:15:38,805 INFO playground.BreakoutLevel2 - ball created.
2022-06-23 15:15:38,810 INFO playground.BreakoutLevelBaseAdvanced - level preperation succeeded.

43
spaceinvaders/GameProject/src/playground/BreakoutLevel3.java

@ -1,10 +1,47 @@
package playground;
import java.awt.Color;
import gameobjects.*;
import java.*;
public class BreakoutLevel3 extends BreakoutLevel0 {
// your code here
public class BreakoutLevel3 extends BreakoutLevel2 {
@Override
public void prepareLevel(String level) {
this.setLevelFlag("points", 0);
this.setGlobalFlag("lives", 3);
TextObject points = new TextObject("Counter", this, 50D, 10D, 0D, 0D, "Points: "+ this.getLevelFlag("points").toString(), 20, Color.BLACK);
this.addObject(points);
TextObject lives = new TextObject ("Counter2", this, 600D, 10D, 0D, 0D, "Lives: "+ this.getGlobalFlag("lives").toString(), 20, Color.GREEN);
this.addObject(lives);
super.prepareLevel(level);
}
@Override
protected void actionIfBallHitsBrick(GameObject ball, GameObject brick) {
super.actionIfBallHitsBrick(ball, brick);
int newPoints = Integer.valueOf(this.getLevelFlag("points").toString()) + 10;
this.setLevelFlag("points", newPoints);
this.addObject(new TextObject("Counter", this, 50D, 10D, 0D, 0D, "Points: "+ this.getLevelFlag("points").toString(), 20, Color.BLACK));
}
@Override
public void applyGameLogic() {
super.applyGameLogic();
if(this.ball.getY() < this.ego.getY()) {
int newLives = Integer.valueOf(this.getGlobalFlag("lives").toString()) - 1;
this.setGlobalFlag("points", newLives);
this.addObject(new TextObject ("Counter2", this, 600D, 10D, 0D, 0D, "Lives: "+ this.getGlobalFlag("lives").toString(), 20, Color.GREEN));
}
}
}

Loading…
Cancel
Save