diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GameLoopManager.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GameLoopManager.java index 9650cbf..9364328 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GameLoopManager.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GameLoopManager.java @@ -16,7 +16,7 @@ public class GameLoopManager { this.gameView = new GameView(); this.gameView.setWindowTitle("Super Pang World"); this.gameView.setStatusText("Andreas Greiner - Java Programmierung SS 2021"); - this.gameView.setWindowIcon("Target.png"); + this.gameView.setWindowIcon("icon.png"); this.gameObjectManager = new GameObjectManager(gameView); this.inputManager = new InputManager(gameView, gameObjectManager.getPlayerObject()); this.gamePlayManager = new GamePlayManager(gameView, gameObjectManager); @@ -26,7 +26,7 @@ public class GameLoopManager { * Starts the main loop of the game. */ public void startGame() { - while (true) { // The "Game-Loop" + while (true) { gamePlayManager.updateGamePlay(); inputManager.updateUserInputs(); gameObjectManager.updateGameObjects(); diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GameObjectManager.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GameObjectManager.java index 2b4ef85..6b20ec5 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GameObjectManager.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GameObjectManager.java @@ -14,45 +14,38 @@ import java.util.LinkedList; */ class GameObjectManager { - private GameView gameView; + private final LinkedList bubbles; + private final LinkedList harpoons; - private LinkedList bubbles; - private LinkedList harpoons; + private final LevelProgressBar levelProgressBar; + private final LevelLabel levelLabel; + private final ScoreLabel scoreLabel; + private final LivesLabel livesLabel; + private final Background background; + private final GameFrame frame; - private LevelProgressBar levelProgressBar; - private LevelLabel levelLabel; - private ScoreLabel scoreLabel; - private LivesLabel livesLabel; - private Background background; - private PlayerObject playerObject; + private final PlayerObject playerObject; - private RandomBall randomBall; - private FollowerBall followerBall; - - private LinkedList gameObjects; + private final LinkedList gameObjects; /** * Create a manager handling the display and passive movement of the game objects. * @param gameView the GameView */ public GameObjectManager(GameView gameView){ - this.gameView = gameView; gameView.setColorForBlockImage('k', Color.LIGHT_GRAY); bubbles = new LinkedList<>(); harpoons = new LinkedList<>(); gameObjects = new LinkedList<>(); - this.levelProgressBar = new LevelProgressBar(gameView); - this.levelLabel = new LevelLabel(gameView); - this.scoreLabel = new ScoreLabel(gameView); - this.livesLabel = new LivesLabel(gameView); - this.background = new Background(gameView); - - this.playerObject = new PlayerObject(gameView); - - this.randomBall = new RandomBall(gameView); - this.followerBall = new FollowerBall(gameView, randomBall); + levelProgressBar = new LevelProgressBar(gameView); + levelLabel = new LevelLabel(gameView); + scoreLabel = new ScoreLabel(gameView); + livesLabel = new LivesLabel(gameView); + background = new Background(gameView); + frame = new GameFrame(gameView); + playerObject = new PlayerObject(gameView); } /** @@ -61,15 +54,14 @@ class GameObjectManager { public void updateGameObjects(){ gameObjects.clear(); gameObjects.add(background); - gameObjects.addAll(bubbles); gameObjects.addAll(harpoons); + gameObjects.add(frame); gameObjects.add(levelProgressBar); gameObjects.add(levelLabel); gameObjects.add(scoreLabel); gameObjects.add(livesLabel); gameObjects.add(playerObject); - gameObjects.add(randomBall); - //gameObjects.add(followerBall); + gameObjects.addAll(bubbles); gameObjects.forEach(gameObject ->{ gameObject.update(); @@ -133,20 +125,4 @@ class GameObjectManager { return harpoons; } - /** - * Adapts the position of all game objects. - * - * @param adaptX Adaption to the right. - * @param adaptY Adaption downwards. - */ - public void moveWorld(double adaptX, double adaptY) { - for (GameObject gameObject : gameObjects) { - if (gameObject.getClass() != LevelLabel.class - && gameObject.getClass() != LevelProgressBar.class - && gameObject.getClass() != LivesLabel.class - && gameObject.getClass() != ScoreLabel.class){ - gameObject.adaptPosition(adaptX, adaptY); - } - } - } } diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GamePlayManager.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GamePlayManager.java index 241f39f..d91c1e7 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GamePlayManager.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/GamePlayManager.java @@ -12,7 +12,7 @@ import de.thdeg.greiner.superpangworld.graphics.moveable.RoundBubble; import de.thdeg.greiner.superpangworld.graphics.moveable.SpecialBubble; import java.util.ArrayList; -import java.util.Arrays; +import java.util.Collections; import java.util.Random; /** @@ -21,30 +21,29 @@ import java.util.Random; public class GamePlayManager { /** The GameView on which the game is displayed */ - private GameView gameView; + private final GameView gameView; /** The manager, which handles the game objects */ - private GameObjectManager gameObjectManager; - /** Flag, if the game objects were already deleted once */ - private boolean listHasBeenDeleted; + private final GameObjectManager gameObjectManager; /** Generator for random values */ - private Random random; + private final Random random; /** Das erste Level */ private Level level; /** Der Spieler */ - private Player player; + private final Player player; /** * Create the manager handling the gameplay. - * @param gameView - * @param gameObjectManager + * + * @param gameView the GameView for visualization + * @param gameObjectManager the manager handling the game objects */ public GamePlayManager(GameView gameView, GameObjectManager gameObjectManager) { - listHasBeenDeleted = false; this.gameView = gameView; this.gameObjectManager = gameObjectManager; - this.level = new Level(1,10000,10000); + level = new Level(1,10000,10000); player = new Player(this.level); - this.random = new Random(); + random = new Random(); + // Set HUD elements gameObjectManager.getPlayerObject().setGamePlayManager(this); gameObjectManager.getLevelLabel().setLevel(level.number); gameObjectManager.getLivesLabel().setLifeCount(player.lives); @@ -56,39 +55,44 @@ public class GamePlayManager { */ public void updateGamePlay(){ if(gameView.timerExpired("SpawnBubble","GamePlayManager")){ - RoundBubble roundBubble = new RoundBubble(gameView, new ArrayList<>(Arrays.asList(gameObjectManager.getPlayerObject()))); + RoundBubble roundBubble = new RoundBubble(gameView, new ArrayList<>(Collections.singletonList(gameObjectManager.getPlayerObject()))); roundBubble.setGamePlayManager(this); gameObjectManager.getBubbles().add(roundBubble); gameView.setTimer("SpawnBubble","GamePlayManager",3000); } - } /** * Shoot a harpoon starting at a given position. + * * @param startPosition the start position + * @return if a harpoon was shot or not */ - public void shootHarpoon(Position startPosition){ - if(gameView.timerExpired("ShootHarpoon","GamePlayManager")){ - ArrayList collidableGameObjects = new ArrayList<>(); - collidableGameObjects.addAll(gameObjectManager.getBubbles()); + public boolean shootHarpoon(Position startPosition){ + if(gameView.timerExpired("ShootHarpoon","GamePlayManager") && gameObjectManager.getHarpoons().size()<2){ + ArrayList collidableGameObjects = new ArrayList<>(gameObjectManager.getBubbles()); Harpoon harpoon = new Harpoon(gameView,collidableGameObjects); - harpoon.getPosition().setTo(startPosition.x, startPosition.y); + harpoon.getPosition().setTo(startPosition.x+16, startPosition.y-15); harpoon.setGamePlayManager(this); gameObjectManager.getHarpoons().add(harpoon); gameView.setTimer("ShootHarpoon","GamePlayManager",300); + return true; } + return false; } /** * Remove a harpoon from the game. + * * @param harpoon the harpoon to remove */ public void destroy(Harpoon harpoon){ gameObjectManager.getHarpoons().remove(harpoon); } + /** * Remove a bubble from the game. + * * @param bubble the bubble to remove */ public void destroy(Bubble bubble){ @@ -107,20 +111,24 @@ public class GamePlayManager { } } + /** + * Update all HUD elements + */ private void updateHud(){ gameObjectManager.getScoreLabel().setScore(player.score); double progress = (player.score- level.neededOverallScore+ level.neededLevelScore * 1.0) / level.neededLevelScore; - System.out.println(progress); gameObjectManager.getLevelProgressBar().setLevelProgress(Math.min((int)(progress*100),100)); gameObjectManager.getLevelLabel().setLevel(level.number); } + /** + * Switch the current level. + */ private void switchLevel(){ if(level.number==99){ System.out.println("You won!"); }else{ - Level newLevel = new Level(level.number+1,10000,(level.number+1)*10000); - level = newLevel; + level = new Level(level.number+1,10000,(level.number+1)*10000); updateHud(); } } @@ -130,6 +138,13 @@ public class GamePlayManager { * - 60% normal bubble * - 30% hexagonal bubble * - 10% special bubble + * + * TODO: Integrate all different bubbles, not only the normal red bubble + * + * @param size the size of the bubble + * @param speedInPixel the speed of the bubble + * @param position the position of the bubble + * @param spawning the flag if the bubble gets created in spawning mode */ private void addRandomBubble(double size, double speedInPixel, Position position, boolean spawning){ int randomNumber = random.nextInt(59); diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/InputManager.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/InputManager.java index 70b188c..89c286d 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/InputManager.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/game/managers/InputManager.java @@ -12,14 +12,15 @@ import java.util.Arrays; class InputManager { /** The gameView, which displays the player object */ - private GameView gameView; + private final GameView gameView; /** The player object */ - private PlayerObject playerObject; + private final PlayerObject playerObject; /** Flag, if diagonal movement is allowed */ private static final boolean DIAGONAL_MOVEMENT_ALLOWED = false; /** - * Create a manager handling the user input + * Create a manager handling the user input. + * * @param gameView the GameView * @param playerObject the player object */ @@ -29,14 +30,14 @@ class InputManager { } /** - * Read the user inputs and perform actions accordingly + * Read the user inputs and perform actions accordingly. */ public void updateUserInputs() { - Integer[] gedruekteTasten = gameView.getKeyCodesOfCurrentlyPressedKeys(); - if(Arrays.stream(gedruekteTasten).anyMatch(k -> k == KeyEvent.VK_SPACE)){ + Integer[] pressedButtons = gameView.getKeyCodesOfCurrentlyPressedKeys(); + if(Arrays.stream(pressedButtons).anyMatch(k -> k == KeyEvent.VK_SPACE)){ playerObject.shoot(); } - for (int keyCode : gedruekteTasten) { + for (int keyCode : pressedButtons) { switch(keyCode) { case KeyEvent.VK_LEFT: playerObject.left(); diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/Bubble.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/Bubble.java index 4633833..69e7771 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/Bubble.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/Bubble.java @@ -11,16 +11,14 @@ import java.util.*; */ public abstract class Bubble extends CollidingGameObject implements MovingGameObject{ - /** Flag, if the bubble flies from left to right */ - private boolean flyFromLeftToRight; /** Random generator */ - private Random random; + private final Random random; /** Flag, if the bubble is in the spawning phase */ private boolean spawning; /** Spawning speed */ private int spawnSpeed; /** Unique id for the spawn event timer */ - private long spawnID; + private final long spawnID; /** Temporary movement action */ private Position nextPosition; @@ -37,7 +35,6 @@ public abstract class Bubble extends CollidingGameObject implements MovingGameOb width = (int) (12 * size); height = (int) (12 * size); speedInPixel = 1; - flyFromLeftToRight = true; spawnID = UUID.randomUUID().getLeastSignificantBits(); random = new Random(); @@ -51,6 +48,7 @@ public abstract class Bubble extends CollidingGameObject implements MovingGameOb /** * Create a bubble. + * * @param gameView the {@link GameView} to display the bubble * @param objectsToCollideWith the list of {@link CollidableGameObject} the bubble can collide with * @param size the object size @@ -65,7 +63,6 @@ public abstract class Bubble extends CollidingGameObject implements MovingGameOb width = (int) (12 * size); height = (int) (12 * size); this.speedInPixel = speedInPixel; - flyFromLeftToRight = true; this.position.setTo(position.x,position.y); spawnID = UUID.randomUUID().getLeastSignificantBits(); random = new Random(); @@ -87,7 +84,7 @@ public abstract class Bubble extends CollidingGameObject implements MovingGameOb if(position.y >= 0){ spawning = false; } else if(gameView.timerExpired("spawn"+spawnID,"bubble"+spawnID)){ - position.down(width/4); + position.down(width/4.0); gameView.setTimer("spawn"+spawnID,"bubble"+spawnID,spawnSpeed); } }else{ @@ -122,7 +119,8 @@ public abstract class Bubble extends CollidingGameObject implements MovingGameOb } /** - * Get the speed in pixel per tick + * Get the speed in pixel per tick. + * * @return the speed in pixel per tick */ public double getSpeedInPixel(){ diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/CollidableGameObject.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/CollidableGameObject.java index cc412d6..49ca981 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/CollidableGameObject.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/CollidableGameObject.java @@ -35,7 +35,7 @@ public abstract class CollidableGameObject extends GameObject { } /** - * If a GameObject has collided with something, it is able to react to the collision + * If a GameObject has collided with something, it is able to react to the collision. * * @param otherObject The other GameObject that is involved in the collision. */ diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/GameObject.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/GameObject.java index 4ff61f2..abb1f5a 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/GameObject.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/GameObject.java @@ -30,6 +30,7 @@ public abstract class GameObject implements Cloneable{ /** * Create a game object with default values. + * * @param gameView the gameView */ protected GameObject(GameView gameView){ @@ -59,6 +60,7 @@ public abstract class GameObject implements Cloneable{ /** * Set the responsible GamePlayManager. + * * @param gamePlayManager the responsible GamePlayManager */ public void setGamePlayManager(GamePlayManager gamePlayManager){ @@ -67,6 +69,7 @@ public abstract class GameObject implements Cloneable{ /** * Get the position of the game object. + * * @return the position */ public Position getPosition(){ diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns.java deleted file mode 100644 index 3d40629..0000000 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns.java +++ /dev/null @@ -1,77 +0,0 @@ -package de.thdeg.greiner.superpangworld.graphics.base; - -import de.thdeg.greiner.superpangworld.gameview.GameView; -import de.thdeg.greiner.superpangworld.graphics.helper.XAxisComparator; - -import java.util.*; - -/** - * Offers different movement patterns for moveable game objects. - */ -public class MovementPatterns { - - - private HashMap> patterns; - private Random random; - - /** - * Create the MovementPatterns object providing access to different movement patterns. - */ - public MovementPatterns(){ - patterns = new HashMap<>(); - random = new Random(); - - ArrayList square = new ArrayList<>((Arrays.asList(new Position(30,30),new Position(930,30), - new Position(930,510),new Position(30,510)))); - ArrayList zigZag = new ArrayList<>((Arrays.asList( new Position(300,200),new Position(400,340),new Position(500,200), - new Position(600,340),new Position(700,200),new Position(800,340)))); - ArrayList zero = new ArrayList<>(); - zero.addAll(square); - zero.addAll(zigZag); - zero.sort(Comparator.naturalOrder()); - ArrayList xFirst = new ArrayList<>(zero); - xFirst.sort(new XAxisComparator()); - - Comparator yAxisComparator = new Comparator() { - @Override - public int compare(Position o1, Position o2) { - return Double.compare(o1.y,o2.y); - } - }; - ArrayList yFirst = new ArrayList<>(zero); - yFirst.sort(yAxisComparator); - - - ArrayList centered = new ArrayList<>(zero); - centered.sort((p1,p2)->{ - Position pMid = new Position(GameView.WIDTH/2,GameView.HEIGHT/2); - return Double.compare(p1.distance(pMid),p2.distance(pMid)); - }); - - patterns.put("square",square); - patterns.put("zigzag",zigZag); - patterns.put("zero",zero); - patterns.put("XFirst",xFirst); - patterns.put("YFirst",yFirst); - patterns.put("Centered",centered); - } - - /** - * Get a movement pattern by its name. - * @param pattern the pattern name - * @return the movement pattern - */ - public ArrayList getPattern(String pattern){ - return patterns.get(pattern); - } - - /** - * get a random movement pattern. - * @return the movement pattern - */ - public ArrayList getRandomPattern(){ - int index = random.nextInt(patterns.values().size()); - return new ArrayList>(patterns.values()).get(index); - } - -} diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/MovingGameObject.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/MovingGameObject.java index e1930f3..6c087df 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/MovingGameObject.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/MovingGameObject.java @@ -8,6 +8,6 @@ public interface MovingGameObject { /** * Update the position of a game object. */ - public void updatePosition(); + void updatePosition(); } diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/Position.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/Position.java index fe061a3..47a9f0e 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/Position.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/base/Position.java @@ -23,13 +23,6 @@ public class Position implements Cloneable, Comparable{ this.y = y; } - /** - * Erzeugt eine Standardposition für die Koordinaten (0, 0). - */ - public Position(){ - this(0,0); - } - /** * Veränderung der Position um einen Pixel nach links. */ @@ -39,6 +32,7 @@ public class Position implements Cloneable, Comparable{ /** * Veränderung der Position nach links. + * * @param pixel die Anzahl der Pixel */ public void left(double pixel){ @@ -54,6 +48,7 @@ public class Position implements Cloneable, Comparable{ /** * Veränderung der Position nach rechts. + * * @param pixel die Anzahl der Pixel */ public void right(double pixel){ @@ -69,6 +64,7 @@ public class Position implements Cloneable, Comparable{ /** * Veränderung der Position nach oben. + * * @param pixel die Anzahl der Pixel */ public void up(double pixel){ @@ -84,6 +80,7 @@ public class Position implements Cloneable, Comparable{ /** * Veränderung der Position nach unten. + * * @param pixel die Anzahl der Pixel */ public void down(double pixel){ @@ -92,6 +89,7 @@ public class Position implements Cloneable, Comparable{ /** * Set the position to given x and y coordinates. + * * @param x the x coordinate * @param y the y coordinate */ diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/helper/Player.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/helper/Player.java index 7328103..bb6bb0f 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/helper/Player.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/helper/Player.java @@ -16,11 +16,13 @@ public class Player { /** * Create a player. + * * @param level the level the player is on */ public Player(Level level){ lives = MAX_LIVES; score = 0; + this.level = level; } } diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/helper/XAxisComparator.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/helper/XAxisComparator.java deleted file mode 100644 index adf2cb0..0000000 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/helper/XAxisComparator.java +++ /dev/null @@ -1,17 +0,0 @@ -package de.thdeg.greiner.superpangworld.graphics.helper; - -import de.thdeg.greiner.superpangworld.graphics.base.Position; - -import java.util.Comparator; - -/** - * Compare two Positions regarding their x values - */ -public class XAxisComparator implements Comparator { - - @Override - public int compare(Position o1, Position o2) { - return (int)Math.signum(o1.x-o2.x); - } - -} diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/Background.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/Background.java index bbef723..4921be5 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/Background.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/Background.java @@ -3,8 +3,6 @@ package de.thdeg.greiner.superpangworld.graphics.immovable; import de.thdeg.greiner.superpangworld.gameview.GameView; import de.thdeg.greiner.superpangworld.graphics.base.GameObject; -import java.util.Random; - /** * The background for the game. */ @@ -20,8 +18,6 @@ public class Background extends GameObject { this.position.setTo(0,0); size = 1; rotation = 0; - - } @Override @@ -30,7 +26,5 @@ public class Background extends GameObject { } @Override - public void updateStatus() { - - } + public void updateStatus() { } } diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/GameFrame.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/GameFrame.java new file mode 100644 index 0000000..3586fe9 --- /dev/null +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/GameFrame.java @@ -0,0 +1,32 @@ +package de.thdeg.greiner.superpangworld.graphics.immovable; + +import de.thdeg.greiner.superpangworld.gameview.GameView; +import de.thdeg.greiner.superpangworld.graphics.base.GameObject; + +/** + * The frame around the game. + */ +public class GameFrame extends GameObject { + + /** + * Create a frame object. + * + * @param gameView the gameView + */ + public GameFrame(GameView gameView) { + super(gameView); + this.position.setTo(0,0); + size = 1; + rotation = 0; + } + + @Override + public void addToCanvas() { + gameView.addImageToCanvas("frame.png",position.x,position.y,size,rotation); + } + + @Override + public void updateStatus() { + + } +} diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LevelLabel.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LevelLabel.java index 15650ba..ddb9933 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LevelLabel.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LevelLabel.java @@ -15,6 +15,7 @@ public class LevelLabel extends GameObject { /** * Create a label for the level with default values. + * * @param gameView the {@link GameView} to display the level label */ public LevelLabel(GameView gameView){ @@ -23,7 +24,7 @@ public class LevelLabel extends GameObject { width = 101; height = 8; level = 1; - getPosition().setTo(GameView.WIDTH/2 - (width/2),GameView.HEIGHT-height-60); + getPosition().setTo(GameView.WIDTH/2.0 - (width/2.0),GameView.HEIGHT-height-60); } /** @@ -35,7 +36,8 @@ public class LevelLabel extends GameObject { } /** - * Set the current level number + * Set the current level number. + * * @param level the level number */ public void setLevel(int level) { diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LevelProgressBar.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LevelProgressBar.java index 0d47cfd..b3d36bf 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LevelProgressBar.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LevelProgressBar.java @@ -15,6 +15,7 @@ public class LevelProgressBar extends GameObject { /** * Create a progress bar with default values. + * * @param gameView the {@link GameView} to display the progress bar */ public LevelProgressBar(GameView gameView){ @@ -23,7 +24,7 @@ public class LevelProgressBar extends GameObject { width = 101; height = 8; levelProgress = 0; - getPosition().setTo(GameView.WIDTH/2 - (width/2),GameView.HEIGHT-(height*size)); + getPosition().setTo(GameView.WIDTH/2.0 - (width/2.0),GameView.HEIGHT-(height*size)); } /** @@ -46,6 +47,7 @@ public class LevelProgressBar extends GameObject { /** * Set the progress of the level. + * * @param levelProgress the progress */ public void setLevelProgress(int levelProgress){ @@ -53,7 +55,8 @@ public class LevelProgressBar extends GameObject { } /** - * Create the middle part of the level progress bar + * Create the middle part of the level progress bar. + * * @param progress the progress to display * @return the pixel art representing the middle part of the progress bar */ diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LivesLabel.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LivesLabel.java index d9ad24b..46e2fd1 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LivesLabel.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/LivesLabel.java @@ -47,6 +47,7 @@ public class LivesLabel extends GameObject { /** * Set the current life count. + * * @param lifeCount the lives */ public void setLifeCount(int lifeCount) { diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/ScoreLabel.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/ScoreLabel.java index a79076a..f6563b0 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/ScoreLabel.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/immovable/ScoreLabel.java @@ -15,6 +15,7 @@ public class ScoreLabel extends GameObject { /** * Create a label for the score with default values. + * * @param gameView the {@link GameView} to display the score label */ public ScoreLabel(GameView gameView) { @@ -33,7 +34,8 @@ public class ScoreLabel extends GameObject { } /** - * Set the game score + * Set the game score. + * * @param score the score */ public void setScore(int score) { diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall.java deleted file mode 100644 index 123741e..0000000 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall.java +++ /dev/null @@ -1,79 +0,0 @@ -package de.thdeg.greiner.superpangworld.graphics.moveable; - -import de.thdeg.greiner.superpangworld.gameview.GameView; -import de.thdeg.greiner.superpangworld.graphics.base.GameObject; -import de.thdeg.greiner.superpangworld.graphics.base.MovingGameObject; -import de.thdeg.greiner.superpangworld.graphics.base.Position; - -import java.awt.*; - -/** This ball follows another ball. */ -public class FollowerBall extends GameObject implements MovingGameObject { - - private enum Status {FOLLOW, CENTER, HIDE} - - private final RandomBall followMe; - private Position targetPosition; - private Status status; - - /** - * Creates the GameObject with the GameView to be displayed on. - * - * @param gameView Window to show the GameObject on. - * @param followMe The RandomBall to follow. - */ - public FollowerBall(GameView gameView, RandomBall followMe) { - super(gameView); - this.status = Status.CENTER; - this.followMe = followMe; - this.position = new Position(GameView.WIDTH, GameView.HEIGHT); - this.size = 50; - this.speedInPixel = 2; - - } - - @Override - public void updatePosition() { - if (gameView.timerExpired("Status", "FollowerBall")) { - gameView.setTimer("Status", "FollowerBall", 3000); - switch (status) { - case HIDE: - status = Status.CENTER; - break; - case CENTER: - status = Status.FOLLOW; - break; - case FOLLOW: - status = Status.HIDE; - break; - } - } - if (status == Status.FOLLOW) { - targetPosition = followMe.getPosition().clone(); - targetPosition.y += 25; - } else if (status == Status.CENTER) { - targetPosition = new Position(GameView.WIDTH / 2d, GameView.HEIGHT / 2d); - } - if (status != Status.HIDE) { - double distance = position.distance(targetPosition); - if (distance >= speedInPixel) { - position.right((targetPosition.x - position.x) / distance * speedInPixel); - position.down((targetPosition.y - position.y) / distance * speedInPixel); - } - } - } - - @Override - protected void updateStatus() { - - } - - @Override - public void addToCanvas() { - if (status == Status.HIDE) { - gameView.addOvalToCanvas(position.x, position.y, size, size, 2, true, Color.WHITE); - } else { - gameView.addOvalToCanvas(position.x, position.y, size, size, 2, true, Color.GREEN); - } - } -} diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/Harpoon.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/Harpoon.java index 5d56aa1..f622399 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/Harpoon.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/Harpoon.java @@ -5,6 +5,7 @@ import de.thdeg.greiner.superpangworld.graphics.base.*; import java.awt.*; import java.util.ArrayList; +import java.util.UUID; /** * A harpoon which can be fired upwards by the player. @@ -17,9 +18,11 @@ public class Harpoon extends CollidingGameObject implements MovingGameObject { " kkkkk \n"+ "k kkk k\n"+ "k kkk k\n"; + private boolean stuckAtRoof; + private final long harpoonID; /** - * Create a harpoon with default values + * Create a harpoon with default values. * * @param gameView the {@link GameView} to display the bubble * @param objectsToCollideWith the list of {@link CollidableGameObject} the harpoon can collide with @@ -32,14 +35,17 @@ public class Harpoon extends CollidingGameObject implements MovingGameObject { height = (int) (5 * size); rotation = 0; getPosition().setTo(300,300); - this.hitBox.width = (int) (width); - this.hitBox.height = (int) (height); + this.hitBox.width = width; + this.hitBox.height = (int) (440 - position.y); + stuckAtRoof = false; + harpoonID = UUID.randomUUID().getLeastSignificantBits(); } @Override protected void updateHitBoxPosition() { hitBox.x = (int) (position.x); hitBox.y = (int) (position.y); + hitBox.height = (int) (440 - position.y); } @Override @@ -56,6 +62,7 @@ public class Harpoon extends CollidingGameObject implements MovingGameObject { @Override public void addToCanvas(){ gameView.addBlockImageToCanvas(HARPOON, getPosition().x, getPosition().y,size, rotation); + gameView.addRectangleToCanvas(position.x + (width/2.0) - 2,position.y + height, 4,440 - position.y,1,true,Color.lightGray); } /** @@ -63,7 +70,12 @@ public class Harpoon extends CollidingGameObject implements MovingGameObject { */ @Override public void updatePosition(){ - getPosition().up(speedInPixel); + if(position.y > 8){ + getPosition().up(Math.min(speedInPixel, position.y-8)); + }else if(!stuckAtRoof){ + stuckAtRoof = true; + gameView.setTimer("stuckAtRoof"+harpoonID,"harpoon"+harpoonID,1000); + } } /** @@ -71,7 +83,7 @@ public class Harpoon extends CollidingGameObject implements MovingGameObject { */ @Override public void updateStatus() { - if(position.y <=0 ){ + if(stuckAtRoof && gameView.timerExpired("stuckAtRoof"+harpoonID,"harpoon"+harpoonID)){ gamePlayManager.destroy(this); } } diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/HexagonalBubble.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/HexagonalBubble.java index 2a508d1..50257b1 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/HexagonalBubble.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/HexagonalBubble.java @@ -4,9 +4,7 @@ import de.thdeg.greiner.superpangworld.gameview.GameView; import de.thdeg.greiner.superpangworld.graphics.base.Bubble; import de.thdeg.greiner.superpangworld.graphics.base.CollidableGameObject; -import java.awt.*; import java.util.ArrayList; -import java.util.Random; /** * The rare hexagonal bubble. @@ -28,8 +26,8 @@ public class HexagonalBubble extends Bubble { width = (int) (128 * size); height = (int) (128 * size); - this.hitBox.width = (int)(width-20); - this.hitBox.height = (int)(height-20); + this.hitBox.width = width-20; + this.hitBox.height = height-20; } @Override diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/PlayerObject.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/PlayerObject.java index e16d699..e8e5a86 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/PlayerObject.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/PlayerObject.java @@ -9,53 +9,43 @@ import java.util.Objects; /** * The game character controlled by the player. */ -public class PlayerObject extends CollidableGameObject { +public class PlayerObject extends CollidableGameObject implements Cloneable { /** Flag, if the player is shooting */ private boolean shooting; - /** Debug flag, to display X and O or the real image */ - private static final boolean SHOW_X = false; - /** The pixel art of the character */ - private static final String SPIELFIGUR = - " kkk \n"+ - " BBBBk \n"+ - " BBBBBB \n"+ - " BBBBBBBB \n"+ - " BBBBBBB \n"+ - " BBBBBBB \n"+ - "kBBBBBBB \n"+ - "kkBBBBBB \n"+ - "kkBBBBBBkkk\n"+ - "kkBBBBBkkkk\n"+ - " BBBBBBkk \n"+ - " BBBBBBBk \n"+ - " kBBBBBBk \n"+ - " BBBBBkb \n"+ - " bbbk kbb \n"+ - " BBBb kBBb\n"+ - " BBBk kkkB"; + + private boolean movingRight; + private boolean movingLeft; + + private boolean movingStanding; /** - * Create the game character with default values + * Create the game character with default values. + * * @param gameView the {@link GameView} to display the character */ public PlayerObject(GameView gameView){ super(gameView); - position.setTo(GameView.WIDTH/2, GameView.HEIGHT/1.5); + position.setTo(GameView.WIDTH/2.0, 360); shooting = false; - size = 3; - width = (int) size * 11; - height = (int) size * 17; - speedInPixel = 5; + size = 2; + width = (int) (26 * size); + height = (int) (41 * size); + speedInPixel = 2; - this.hitBox.width = (int) (width - (2*size)); - this.hitBox.height = (int) (height - (1*size)); + this.hitBox.width = width; + this.hitBox.height = height; + + movingRight = false; + movingLeft = false; + + movingStanding = true; } @Override protected void updateHitBoxPosition() { - hitBox.x = (int) (position.x + (1*size)); - hitBox.y = (int) (position.y + (1*size)); + hitBox.x = (int) (position.x ); + hitBox.y = (int) (position.y); } @Override @@ -65,39 +55,66 @@ public class PlayerObject extends CollidableGameObject { @Override public void addToCanvas(){ - if(SHOW_X) { - gameView.addTextToCanvas(shooting ? "O" : "X", position.x, position.y, 50, Color.RED, rotation); - }else{ - gameView.addBlockImageToCanvas(SPIELFIGUR, position.x, position.y, size, rotation); + if(!gameView.timerExpired("shootHarpoon","PlayerObject")){ + gameView.addImageToCanvas("behind.png",position.x,position.y,2,0); + return; } - shooting = false; + + if(gameView.timerExpired("movingStanding","PlayerObject")){ + movingStanding = !movingStanding; + gameView.setTimer("movingStanding","PlayerObject",100); + } + if(movingLeft && !movingRight){ + if(movingStanding){ + gameView.addImageToCanvas("left_standing.png",position.x,position.y,2,0); + }else{ + gameView.addImageToCanvas("left_walking.png",position.x,position.y,2,0); + } + }else if(movingRight && !movingLeft){ + if(movingStanding){ + gameView.addImageToCanvas("right_standing.png",position.x,position.y,2,0); + }else{ + gameView.addImageToCanvas("right_walking.png",position.x,position.y,2,0); + } + }else{ + gameView.addImageToCanvas("behind.png",position.x,position.y,2,0); + movingStanding = true; + } + movingLeft = false; + movingRight = false; } @Override public void updateStatus() { - } - /** Moves the character to the left */ + /** + * Moves the character to the left + */ public void left(){ - position.left(speedInPixel); + + if(gameView.timerExpired("shootHarpoon","PlayerObject") && position.x>8) { + position.left(Math.min(speedInPixel, position.x-8)); + movingLeft = true; + } } - /** Moves the character to the right */ + /** + * Moves the character to the right + */ public void right(){ - position.right(speedInPixel); + if(gameView.timerExpired("shootHarpoon","PlayerObject") && position.x < GameView.WIDTH - width - 8){ + position.right(Math.min(speedInPixel, (GameView.WIDTH-position.x))); + movingRight = true; + } } - /** Moves the character upwards */ - public void up(){ - position.up(speedInPixel); - } - /** Moves the character downwards */ - public void down(){ - position.down(speedInPixel); - } - /** Lets the character shoot */ + /** + * Lets the character shoot + */ public void shoot(){ - shooting = true; - gamePlayManager.shootHarpoon(this.position); + if(gamePlayManager.shootHarpoon(this.position)){ + shooting = true; + gameView.setTimer("shootHarpoon","PlayerObject", 100); + } } @Override @@ -118,4 +135,5 @@ public class PlayerObject extends CollidableGameObject { public int hashCode() { return Objects.hash(super.hashCode(), shooting); } + } diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/RandomBall.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/RandomBall.java deleted file mode 100644 index 2763dd1..0000000 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/RandomBall.java +++ /dev/null @@ -1,74 +0,0 @@ -package de.thdeg.greiner.superpangworld.graphics.moveable; - -import de.thdeg.greiner.superpangworld.gameview.GameView; -import de.thdeg.greiner.superpangworld.graphics.base.GameObject; -import de.thdeg.greiner.superpangworld.graphics.base.MovementPatterns; -import de.thdeg.greiner.superpangworld.graphics.base.MovingGameObject; -import de.thdeg.greiner.superpangworld.graphics.base.Position; - -import java.awt.*; -import java.util.*; -import java.util.List; - -/** Ball with random movement. */ -public class RandomBall extends GameObject implements MovingGameObject { - private final Random random; - private ArrayList movementPattern; - private int movementPatternIndex; - private Position targetPosition; - private MovementPatterns movementPatterns; - - - /** - * Creates the GameObject with the GameView to be displayed on. - * - * @param gameView Window to show the GameObject on. - */ - public RandomBall(GameView gameView) { - super(gameView); - this.random = new Random(); - this.size = 50; - this.speedInPixel = 4; - - movementPatterns = new MovementPatterns(); - - movementPattern = movementPatterns.getPattern("Centered"); - movementPatternIndex = 0; - targetPosition = movementPattern.get(0); - } - - @Override - public void updatePosition() { - double distance = position.distance(targetPosition); - if (distance >= speedInPixel) { - position.right((targetPosition.x - position.x) / distance * speedInPixel); - position.down((targetPosition.y - position.y) / distance * speedInPixel); - } else { - if(movementPatternIndex < movementPattern.size()-1){ - movementPatternIndex++; - }else{ - movementPattern = movementPatterns.getPattern("Centered"); - movementPatternIndex = 0; - } - targetPosition = movementPattern.get(movementPatternIndex); - } - } - - - @Override - protected void updateStatus() { - - } - - /** Set position to aim at */ - public void setRandomTargetPosition() { - targetPosition.x = random.nextInt(GameView.WIDTH); - targetPosition.y = random.nextInt(GameView.HEIGHT); - } - - @Override - public void addToCanvas() { - gameView.addOvalToCanvas(position.x, position.y, size, size, 2, true, Color.YELLOW); - gameView.addOvalToCanvas(targetPosition.x, targetPosition.y, size, size, 2, false, Color.WHITE); - } -} diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/RoundBubble.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/RoundBubble.java index 3df5c76..c636cd1 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/RoundBubble.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/RoundBubble.java @@ -5,9 +5,7 @@ import de.thdeg.greiner.superpangworld.graphics.base.Bubble; import de.thdeg.greiner.superpangworld.graphics.base.CollidableGameObject; import de.thdeg.greiner.superpangworld.graphics.base.Position; -import java.awt.*; import java.util.ArrayList; -import java.util.Random; /** diff --git a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble.java b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble.java index 28dc425..1ac303d 100644 --- a/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble.java +++ b/SuperPangWorld/src/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble.java @@ -4,9 +4,7 @@ import de.thdeg.greiner.superpangworld.gameview.GameView; import de.thdeg.greiner.superpangworld.graphics.base.Bubble; import de.thdeg.greiner.superpangworld.graphics.base.CollidableGameObject; -import java.awt.*; import java.util.ArrayList; -import java.util.Random; /** * The green bubble with special abilities. @@ -27,8 +25,6 @@ public class SpecialBubble extends Bubble { " GGGGGWWG \n"+ " GGGWWG \n"+ " GGGG \n"; - /** Flag if the time is stopped or all bubbles are popped when this bubble gets popped. */ - private Status status; /** * Create a special bubble with default values. @@ -39,8 +35,6 @@ public class SpecialBubble extends Bubble { public SpecialBubble(GameView gameView, ArrayList objectsToCollideWith) { super(gameView,objectsToCollideWith); - status = Status.FREEZE; - this.hitBox.width = width-20; this.hitBox.height = height-20; } @@ -57,29 +51,5 @@ public class SpecialBubble extends Bubble { } @Override - public void updateStatus() { - - } - - /** - * Switches the active effect. - */ - private void switchEffect(){ - - } - - /** - * Activates the current effect. - */ - private void activateEffect(){ - - } - - /** - * Enumeration to decide if when the bubble is popped the time is stopped or all bubbles are popped. - */ - private enum Status{ - FREEZE, - POP - } + public void updateStatus() {} } diff --git a/SuperPangWorld/src/resources/behind.png b/SuperPangWorld/src/resources/behind.png new file mode 100644 index 0000000..eb3c8f8 Binary files /dev/null and b/SuperPangWorld/src/resources/behind.png differ diff --git a/SuperPangWorld/src/resources/frame.png b/SuperPangWorld/src/resources/frame.png new file mode 100644 index 0000000..36fca38 Binary files /dev/null and b/SuperPangWorld/src/resources/frame.png differ diff --git a/SuperPangWorld/src/resources/icon.png b/SuperPangWorld/src/resources/icon.png new file mode 100644 index 0000000..e3a9729 Binary files /dev/null and b/SuperPangWorld/src/resources/icon.png differ diff --git a/SuperPangWorld/src/resources/left_standing.png b/SuperPangWorld/src/resources/left_standing.png new file mode 100644 index 0000000..860adf4 Binary files /dev/null and b/SuperPangWorld/src/resources/left_standing.png differ diff --git a/SuperPangWorld/src/resources/left_walking.png b/SuperPangWorld/src/resources/left_walking.png new file mode 100644 index 0000000..656b32b Binary files /dev/null and b/SuperPangWorld/src/resources/left_walking.png differ diff --git a/SuperPangWorld/src/resources/right_standing.png b/SuperPangWorld/src/resources/right_standing.png new file mode 100644 index 0000000..c2c2273 Binary files /dev/null and b/SuperPangWorld/src/resources/right_standing.png differ diff --git a/SuperPangWorld/src/resources/right_walking.png b/SuperPangWorld/src/resources/right_walking.png new file mode 100644 index 0000000..70fd83d Binary files /dev/null and b/SuperPangWorld/src/resources/right_walking.png differ diff --git a/out/artifacts/Programmieren_2_jar/Programmieren 2.jar b/out/artifacts/Programmieren_2_jar/Programmieren 2.jar index 34c2ca4..175bd2b 100644 Binary files a/out/artifacts/Programmieren_2_jar/Programmieren 2.jar and b/out/artifacts/Programmieren_2_jar/Programmieren 2.jar differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GameLoopManager.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GameLoopManager.class index da31a6c..a211af4 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GameLoopManager.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GameLoopManager.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GameObjectManager.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GameObjectManager.class index e0eb6e1..d606496 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GameObjectManager.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GameObjectManager.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GamePlayManager.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GamePlayManager.class index 4be6472..f09a974 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GamePlayManager.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/GamePlayManager.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/InputManager.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/InputManager.class index c3f277f..17437a9 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/InputManager.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/game/managers/InputManager.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/Bubble.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/Bubble.class index 4f4c3d6..7c31dc8 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/Bubble.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/Bubble.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/GameObject.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/GameObject.class index 90a61c2..1548b34 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/GameObject.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/GameObject.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns$1.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns$1.class deleted file mode 100644 index 9f0d8dd..0000000 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns$1.class and /dev/null differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns.class deleted file mode 100644 index 54f5e9b..0000000 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/MovementPatterns.class and /dev/null differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/Position.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/Position.class index 4fd40da..8209f1e 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/Position.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/base/Position.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/helper/Player.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/helper/Player.class index 16f6178..1b4a58f 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/helper/Player.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/helper/Player.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/helper/XAxisComparator.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/helper/XAxisComparator.class deleted file mode 100644 index cec5568..0000000 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/helper/XAxisComparator.class and /dev/null differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/Background.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/Background.class index b08bca8..375e032 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/Background.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/Background.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/GameFrame.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/GameFrame.class new file mode 100644 index 0000000..e740aa4 Binary files /dev/null and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/GameFrame.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LevelLabel.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LevelLabel.class index 3545624..b04b44a 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LevelLabel.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LevelLabel.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LevelProgressBar.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LevelProgressBar.class index 3ba7157..2057ffe 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LevelProgressBar.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LevelProgressBar.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LivesLabel.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LivesLabel.class index 71e16e0..0083df5 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LivesLabel.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/LivesLabel.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/ScoreLabel.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/ScoreLabel.class index 0d6d2bd..c9ebc61 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/ScoreLabel.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/immovable/ScoreLabel.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall$1.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall$1.class deleted file mode 100644 index 419e2fe..0000000 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall$1.class and /dev/null differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall$Status.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall$Status.class deleted file mode 100644 index 74854b1..0000000 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall$Status.class and /dev/null differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall.class deleted file mode 100644 index 610dafc..0000000 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/FollowerBall.class and /dev/null differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/Harpoon.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/Harpoon.class index 77cbd44..a2bf3a6 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/Harpoon.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/Harpoon.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/HexagonalBubble.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/HexagonalBubble.class index b2a54dd..21cbd21 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/HexagonalBubble.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/HexagonalBubble.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/PlayerObject.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/PlayerObject.class index 9451239..64833a1 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/PlayerObject.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/PlayerObject.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/RandomBall.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/RandomBall.class deleted file mode 100644 index f1239a5..0000000 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/RandomBall.class and /dev/null differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/RoundBubble.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/RoundBubble.class index 81b4562..08ccdf4 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/RoundBubble.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/RoundBubble.class differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble$Status.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble$Status.class deleted file mode 100644 index 113eda3..0000000 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble$Status.class and /dev/null differ diff --git a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble.class b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble.class index d721213..4fed2ce 100644 Binary files a/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble.class and b/out/production/SuperPangWorld/de/thdeg/greiner/superpangworld/graphics/moveable/SpecialBubble.class differ diff --git a/out/production/SuperPangWorld/resources/behind.png b/out/production/SuperPangWorld/resources/behind.png new file mode 100644 index 0000000..eb3c8f8 Binary files /dev/null and b/out/production/SuperPangWorld/resources/behind.png differ diff --git a/out/production/SuperPangWorld/resources/frame.png b/out/production/SuperPangWorld/resources/frame.png new file mode 100644 index 0000000..36fca38 Binary files /dev/null and b/out/production/SuperPangWorld/resources/frame.png differ diff --git a/out/production/SuperPangWorld/resources/icon.png b/out/production/SuperPangWorld/resources/icon.png new file mode 100644 index 0000000..e3a9729 Binary files /dev/null and b/out/production/SuperPangWorld/resources/icon.png differ diff --git a/out/production/SuperPangWorld/resources/left_standing.png b/out/production/SuperPangWorld/resources/left_standing.png new file mode 100644 index 0000000..860adf4 Binary files /dev/null and b/out/production/SuperPangWorld/resources/left_standing.png differ diff --git a/out/production/SuperPangWorld/resources/left_walking.png b/out/production/SuperPangWorld/resources/left_walking.png new file mode 100644 index 0000000..656b32b Binary files /dev/null and b/out/production/SuperPangWorld/resources/left_walking.png differ diff --git a/out/production/SuperPangWorld/resources/right_standing.png b/out/production/SuperPangWorld/resources/right_standing.png new file mode 100644 index 0000000..c2c2273 Binary files /dev/null and b/out/production/SuperPangWorld/resources/right_standing.png differ diff --git a/out/production/SuperPangWorld/resources/right_walking.png b/out/production/SuperPangWorld/resources/right_walking.png new file mode 100644 index 0000000..70fd83d Binary files /dev/null and b/out/production/SuperPangWorld/resources/right_walking.png differ