Browse Source
Merge branch 'main' of gogs.informatik.hs-fulda.de:jkonert/prog2-codebase into main
Merge branch 'main' of gogs.informatik.hs-fulda.de:jkonert/prog2-codebase into main
Manu
2 years ago
9 changed files with 105 additions and 20 deletions
-
1.gitignore
-
4GameProject/src/base/GameLoop.java
-
33GameProject/src/base/MovingObjectsGame.java
-
14GameProject/src/controller/CollisionAwareEgoController.java
-
46GameProject/src/controller/EgoController.java
-
2GameProject/src/playground/Level2.java
-
4GameProject/src/playground/Level4.java
-
21GameProject/src/playground/LevelMovingObjects.java
-
BINGameProject/video/alexG.jpg
@ -1,6 +1,7 @@ |
|||
*.DS_Store |
|||
*.metadata/ |
|||
*.class |
|||
*.prefs |
|||
/GameProject/doc/ |
|||
/GameProject/log/ |
|||
/GameProject/highscore.txt |
|||
|
@ -0,0 +1,33 @@ |
|||
package base; |
|||
|
|||
import java.io.IOException; |
|||
import playground.LevelMovingObjects; |
|||
|
|||
/** |
|||
* main class to start a game with only one level {@link playground.LevelMovingObjects}. |
|||
* |
|||
*/ |
|||
public class MovingObjectsGame extends GameLoop { |
|||
|
|||
/** |
|||
* starts this game. |
|||
* |
|||
* @param args command line parameters (forwarded to {@link GameLoop#runGame(String[])}). |
|||
* @throws IOException if highscore.txt file cannot be written or accessed, the exception is |
|||
* thrown (and game ends). |
|||
*/ |
|||
public static void main(String[] args) throws IOException { |
|||
GameLoop myGame = new MovingObjectsGame(); |
|||
myGame.runGame(args); |
|||
} |
|||
|
|||
/** |
|||
* adds only one level to play ({@link playground.LevelMovingObjects}). |
|||
*/ |
|||
@Override |
|||
public void defineLevels() { |
|||
this.resetLevels(); |
|||
this.addLevel(new LevelMovingObjects()); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,21 @@ |
|||
package playground; |
|||
|
|||
|
|||
|
|||
/** This level adds two distracting objects to the canvas that cannot collide but bounce around all the time. |
|||
*/ |
|||
public class LevelMovingObjects extends SpaceInvadersLevel { |
|||
|
|||
// TODO your code here |
|||
|
|||
|
|||
/** "Moving Objects Level!" is the message. |
|||
* |
|||
* @return String "Moving Objects Level!" |
|||
*/ |
|||
@Override |
|||
protected String getStartupMessage() { |
|||
return "Moving Objects Level!"; |
|||
} |
|||
} |
|||
|
Before Width: 1664 | Height: 2496 | Size: 181 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue