9 Commits
1aa3b4cb95
...
bd8daa1ece
Author | SHA1 | Message | Date |
---|---|---|---|
Manu | bd8daa1ece |
Hausaufgabe 5 Anfang
|
3 years ago |
Manu | 1c30583e1f |
Merge branch 'main' of gogs.informatik.hs-fulda.de:jkonert/prog2-codebase into main
|
3 years ago |
jkonert | b07f813a15 |
HA05 base files added
|
3 years ago |
jkonert | 35cfe32ba4 |
fixed some JavaDoc problems, especially German Umlauts on MacOs (encoding of files problem...should be UTF-8)
|
3 years ago |
jkonert | 6db3f15fc8 |
added *.prefs to ignore file
|
3 years ago |
jkonert | 733f17dbe8 |
and yet another JavaDoc fix
|
3 years ago |
jkonert | 95060106fc |
another JavaDoc fix
|
3 years ago |
jkonert | f0343418f9 |
fixed some JavaDoc mistakes
|
3 years ago |
jkonert | 82cd0392e5 |
removed old JPG of prof Gepperth
|
3 years ago |
11 changed files with 118 additions and 23 deletions
-
1.gitignore
-
7GameProject/src/base/GameLoop.java
-
33GameProject/src/base/MovingObjectsGame.java
-
3GameProject/src/base/MultiLevelGame.java
-
14GameProject/src/controller/CollisionAwareEgoController.java
-
46GameProject/src/controller/EgoController.java
-
2GameProject/src/playground/Level2.java
-
4GameProject/src/playground/Level4.java
-
28GameProject/src/playground/LevelMovingObjects.java
-
3GameProject/src/playground/LevelWithBox.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,28 @@ |
|||
package playground; |
|||
|
|||
import java.awt.Color; |
|||
|
|||
import gameobjects.RectObject; |
|||
|
|||
/** This level adds two distracting objects to the canvas that cannot collide but bounce around all the time. |
|||
*/ |
|||
public class LevelMovingObjects extends SpaceInvadersLevel { |
|||
|
|||
public void prepareLevel(String id) { |
|||
super.prepareLevel(id); |
|||
LevelMovingObjects ml = this; |
|||
RectObject object2 = new RectObject(id +"Bluebox",ml,300,300,170,70,30,30,Color.BLUE); |
|||
this.addObject(object2); |
|||
} |
|||
|
|||
|
|||
/** "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