Browse Source

HA03 done

main
Nico B 3 years ago
parent
commit
54384d9e6f
  1. 11
      GameProject/src/playground/Level5.java
  2. 10
      GameProject/src/playground/Level6.java
  3. 10
      GameProject/src/playground/Level7.java

11
GameProject/src/playground/Level5.java

@ -3,19 +3,24 @@ package playground;
public class Level5 extends Level5to7{ public class Level5 extends Level5to7{
protected static final double ENEMYSPEEDX = 160;
protected static final double ENEMYSPEEDY = 80;
protected static final int NR_ENEMIES = 5;
@Override @Override
protected int calcNrEnemies() { protected int calcNrEnemies() {
return 5;
return NR_ENEMIES;
} }
@Override @Override
protected double calcEnemySpeedX() { protected double calcEnemySpeedX() {
return 160;
return ENEMYSPEEDX;
} }
@Override @Override
protected double calcEnemySpeedY() { protected double calcEnemySpeedY() {
return 80;
return ENEMYSPEEDY;
} }
@Override @Override

10
GameProject/src/playground/Level6.java

@ -4,18 +4,22 @@ package playground;
public class Level6 extends Level5to7 { public class Level6 extends Level5to7 {
protected static final double ENEMYSPEEDX = 480;
protected static final double ENEMYSPEEDY = 80;
protected static final int NR_ENEMIES = 12;
protected int calcNrEnemies() { protected int calcNrEnemies() {
return 12;
return NR_ENEMIES;
} }
@Override @Override
protected double calcEnemySpeedX() { protected double calcEnemySpeedX() {
return 480;
return ENEMYSPEEDX;
} }
@Override @Override
protected double calcEnemySpeedY() { protected double calcEnemySpeedY() {
return 80;
return ENEMYSPEEDY;
} }
@Override @Override

10
GameProject/src/playground/Level7.java

@ -2,18 +2,22 @@ package playground;
public class Level7 extends Level5to7{ public class Level7 extends Level5to7{
protected static final double ENEMYSPEEDX = 800;
protected static final double ENEMYSPEEDY = 140;
protected static final int NR_ENEMIES =21;
protected int calcNrEnemies() { protected int calcNrEnemies() {
return 21;
return NR_ENEMIES;
} }
@Override @Override
protected double calcEnemySpeedX() { protected double calcEnemySpeedX() {
return 800;
return ENEMYSPEEDX;
} }
@Override @Override
protected double calcEnemySpeedY() { protected double calcEnemySpeedY() {
return 140;
return ENEMYSPEEDY;
} }
@Override @Override

Loading…
Cancel
Save