Browse Source

WHAT NOW

master
Kai Simon 3 years ago
parent
commit
4dd705c267
  1. BIN
      GameProject.zip
  2. 14
      GameProject/src/base/MultiLevellGame.java
  3. 13
      GameProject/src/playground/AdditionalMethodsForEachLevel.java
  4. 23
      GameProject/src/playground/Level5.java
  5. 23
      GameProject/src/playground/Level6.java
  6. 23
      GameProject/src/playground/Level7.java

BIN
GameProject.zip

14
GameProject/src/base/MultiLevellGame.java

@ -2,20 +2,18 @@ package base;
import java.io.IOException; import java.io.IOException;
import playground.Level1;
import playground.LevelHitTwice;
import playground.Level3;
import playground.LevelBoss;
import playground.Level5;
import playground.Level6;
import playground.Level7;
public class MultiLevellGame extends GameLoop{ public class MultiLevellGame extends GameLoop{
@Override @Override
void defineLevels() { void defineLevels() {
this.resetLevels(); this.resetLevels();
this.addLevel(new Level1());
this.addLevel(new LevelHitTwice());
this.addLevel(new Level3());
this.addLevel(new LevelBoss());
this.addLevel(new Level5());
this.addLevel(new Level6());
this.addLevel(new Level7());
} }

13
GameProject/src/playground/AdditionalMethodsForEachLevel.java

@ -0,0 +1,13 @@
package playground;
import gameobjects.GameObject;
public class AdditionalMethodsForEachLevel extends SpaceInvadersLevel {
@Override
void actionIfEnemyIsHit(GameObject e, GameObject shot)
{
super.actionIfEnemyIsHit(e,shot);
System.out.println("AUA!!");
}
}

23
GameProject/src/playground/Level5.java

@ -0,0 +1,23 @@
package playground;
public class Level5 extends AdditionalMethodsForEachLevel{
@Override
protected int calcNrEnemies(){
return 5;
}
@Override
protected double calcEnemySpeedX(){
return 160.0;
}
@Override
protected double calcEnemySpeedY() {
return 80.0;
}
protected String getStartupMessage()
{
return "Level5, get Ready!";
}
}

23
GameProject/src/playground/Level6.java

@ -0,0 +1,23 @@
package playground;
public class Level6 extends AdditionalMethodsForEachLevel{
@Override
protected int calcNrEnemies(){
return 12;
}
@Override
protected double calcEnemySpeedX(){
return 480.0;
}
@Override
protected double calcEnemySpeedY() {
return 80.0;
}
protected String getStartupMessage()
{
return "Level6, get Ready!";
}
}

23
GameProject/src/playground/Level7.java

@ -0,0 +1,23 @@
package playground;
public class Level7 extends AdditionalMethodsForEachLevel{
@Override
protected int calcNrEnemies(){
return 21;
}
@Override
protected double calcEnemySpeedX(){
return 800.0;
}
@Override
protected double calcEnemySpeedY() {
return 140.0;
}
protected String getStartupMessage()
{
return "Level7 , get Ready!";
}
}
Loading…
Cancel
Save