Skip to content
Snippets Groups Projects
Commit e8b4b3df authored by Schlütter Yannik's avatar Schlütter Yannik
Browse files

Update: Classes for Clean Codecand TODOS as problems

#90
parent 17166140
No related branches found
No related tags found
5 merge requests!74V1,!73Initial commit,!71Merge DataBase into Development,!54Update: coreMaps.json (added new maps),!52Merge LocalGameplay into development
......@@ -53,9 +53,6 @@ public class BigBomb implements IEntity {
frames[0] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/big_bomb/Bigbomb.png")));
frames[1] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/big_bomb/Bigbomb.png")));
frames[2] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/bomb/redbomb.png")));
//frames[3] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/vfx/bigexplosion.png")));
//frames[4] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/vfx/middleexplosion.png")));
//frames[5] = new Image(Objects.requireNonNull(getClass().getResourceAsStream("/textures/objects/vfx/smallexplosion.png")));
}
@Override
......@@ -94,7 +91,6 @@ public class BigBomb implements IEntity {
if (frameCounter > 17) {
if (frameIndex == 0) {
frameIndex = 1;
//PLayer.spawnExplosion();
} else if (frameIndex == 1) {
frameIndex = 2;
}else if (frameIndex == 2){
......@@ -201,7 +197,7 @@ public class BigBomb implements IEntity {
IEntity explosion = EntityFactory.createGameplayObject(ObjectType.EXPLOSION, spawnCordY * scaledTileSize, spawnCordX * scaledTileSize, graphicsContext);
gameplayObjects.add(explosion);
runtimeInfo.setGameplayObjects(gameplayObjects);
log.debug("explosion placed");
log.info("Big Bomb explosion placed");
changeCheckedTileDestructable(graphicsContext);
}
......
......@@ -215,7 +215,7 @@ public class Bomb implements IEntity {
IEntity explosion = EntityFactory.createGameplayObject(ObjectType.EXPLOSION, spawnCordY * scaledTileSize, spawnCordX * scaledTileSize, graphicsContext);
gameplayObjects.add(explosion);
runtimeInfo.setGameplayObjects(gameplayObjects);
log.debug("explosion placed");
log.debug("Normal Bomb explosion placed");
changeCheckedTileDestructable(graphicsContext);
}
......@@ -237,7 +237,7 @@ public class Bomb implements IEntity {
IEntity bigBombItemFrame = EntityFactory.createGameplayObject(ObjectType.HEART, x, y, graphicsContext);
gameplayObjects.add(bigBombItemFrame);
runtimeInfo.setGameplayObjects(gameplayObjects);
log.info("BigBombItemFrame dropped");
log.debug("BigBombItemFrame dropped");
}
else if (randomDropChance < dropChanceHeart + dropChanceBigBombItemFrame + dropChanceBlastUpItemFrame) {
List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects();
......
......@@ -364,8 +364,8 @@ class Player implements IEntity {
}
} else if (gameplayObject.getOBJECT_TYPE() == ObjectType.EXPLOSION) {
if (gameplayObject.getBoxCollider().intersects(boxCollider)) {
log.debug("Collision with explosion");
gotHit(10);
log.info("Collision with explosion");
gotHit(10); //TODO: Player still takes way too much damage
}
}
}
......@@ -379,7 +379,7 @@ class Player implements IEntity {
inputHandler.isSdBomb() && PLAYER_MODE == PlayerMode.PLAYER_TWO && bombPlacementRate == 0) {
if(isBigBombItemFrame){
log.debug("We have Itemframes in the List");
log.debug("We have Big_Bomb Itemframes in the List");
bombPlacementRate = 100;
int xTile = mapPosX / scaledTileSize;
int yTile = mapPosY / scaledTileSize;
......@@ -525,7 +525,7 @@ class Player implements IEntity {
health = 0;
log.debug("Dead");
}
log.debug("DamageTaken, current Health: " + health);
log.info("DamageTaken, current Health: " + health);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment