Lea Anton
3 years ago
6 changed files with 133 additions and 8 deletions
-
14.gitignore
-
19GameProject/src/base/MultiLevelGame.java
-
27GameProject/src/playground/Level5.java
-
21GameProject/src/playground/Level5to7.java
-
31GameProject/src/playground/Level6.java
-
29GameProject/src/playground/Level7.java
@ -1,7 +1,19 @@ |
|||
/.metadata/ |
|||
*.metadata/ |
|||
*.class |
|||
/GameProject/doc/ |
|||
/GameProject/log/ |
|||
/GameProject/log\\log4j.log |
|||
/GameProject/highscore.txt |
|||
/GameProject/bin/ |
|||
.metadata/.log |
|||
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi |
|||
.metadata/version.ini |
|||
.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.markers.snap |
|||
.metadata/.plugins/org.eclipse.core.resources/.projects/.org.eclipse.egit.core.cmp/.syncinfo.snap |
|||
.metadata/.plugins/org.eclipse.core.resources/.projects/GameProject/.markers.snap |
|||
.metadata/.plugins/org.eclipse.core.resources/.projects/GameProject/.syncinfo.snap |
|||
.metadata/.plugins/org.eclipse.core.resources/.root/.markers.snap |
|||
.metadata/.plugins/org.eclipse.core.resources/.safetable/org.eclipse.core.resources |
|||
.metadata/.plugins/org.eclipse.core.resources/4.snap |
|||
.metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi |
|||
|
@ -0,0 +1,21 @@ |
|||
package playground; |
|||
|
|||
import java.awt.Color; |
|||
|
|||
import gameobjects.GameObject; |
|||
|
|||
public class Level5to7 extends SpaceInvadersLevel { |
|||
|
|||
@Override |
|||
void actionIfEnemyIsHit(GameObject e, GameObject shot) { |
|||
|
|||
super.actionIfEnemyIsHit(e, shot); |
|||
|
|||
|
|||
System.out.println("AUA!!"); |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package playground; |
|||
|
|||
|
|||
|
|||
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() { |
|||
return NR_ENEMIES; |
|||
} |
|||
|
|||
@Override |
|||
protected double calcEnemySpeedX() { |
|||
return ENEMYSPEEDX; |
|||
} |
|||
|
|||
@Override |
|||
protected double calcEnemySpeedY() { |
|||
return ENEMYSPEEDY; |
|||
} |
|||
|
|||
@Override |
|||
protected String getStartupMessage() { |
|||
return "Level6, get ready"; |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package playground; |
|||
|
|||
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() { |
|||
return NR_ENEMIES; |
|||
} |
|||
|
|||
@Override |
|||
protected double calcEnemySpeedX() { |
|||
return ENEMYSPEEDX; |
|||
} |
|||
|
|||
@Override |
|||
protected double calcEnemySpeedY() { |
|||
return ENEMYSPEEDY; |
|||
} |
|||
|
|||
@Override |
|||
protected String getStartupMessage() { |
|||
return "Level7, get ready"; |
|||
} |
|||
|
|||
|
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue