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

Add: BigBombItemFrame to pick up and be able to spawn BigBombs, more Destructible Tiles

Update: Spawn/ Spawnrate of different items
Fix: Destruction of Boxes behind Boxes

Forgot #83 #79
parent b12cb2a0
No related branches found
No related tags found
4 merge requests!74V1,!73Initial commit,!71Merge DataBase into Development,!33Update: Items, spawn locations of items, hit rate, i-frames
...@@ -354,7 +354,6 @@ class Player implements IEntity { ...@@ -354,7 +354,6 @@ class Player implements IEntity {
@Override @Override
public void placeBomb(IEntity entity, GraphicsContext graphicsContext) { public void placeBomb(IEntity entity, GraphicsContext graphicsContext) {
int x, y;
List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects(); //TODO: This is 0? List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects(); //TODO: This is 0?
if (inputHandler.isBomb() && PLAYER_MODE == PlayerMode.PLAYER_ONE && bombPlacementRate == 0 || if (inputHandler.isBomb() && PLAYER_MODE == PlayerMode.PLAYER_ONE && bombPlacementRate == 0 ||
inputHandler.isSdBomb() && PLAYER_MODE == PlayerMode.PLAYER_TWO && bombPlacementRate == 0) { inputHandler.isSdBomb() && PLAYER_MODE == PlayerMode.PLAYER_TWO && bombPlacementRate == 0) {
...@@ -576,10 +575,10 @@ class Player implements IEntity { ...@@ -576,10 +575,10 @@ class Player implements IEntity {
int x,y; //TODO Fix Explosion int x,y; //TODO Fix Explosion
List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects(); List<IEntity> gameplayObjects = runtimeInfo.getGameplayObjects();
List<IEntity> explosionList = gameplayObjects.stream().filter(obj -> obj.getOBJECT_TYPE() == ObjectType.EXPLOSION) List<IEntity> explosionList = gameplayObjects.stream().filter(obj -> obj.getOBJECT_TYPE() == ObjectType.EXPLOSION)
.collect(Collectors.toList()); .toList();
for (int i =0; i < explosionList.size(); i++) { for (IEntity entity : explosionList) {
y = (explosionList.get(i).getMapPosY()) / scaledTileSize; y = (entity.getMapPosY()) / scaledTileSize;
x = (explosionList.get(i).getMapPosX()) / scaledTileSize; x = (entity.getMapPosX()) / scaledTileSize;
if (TileManager.tileMap[y][x] > 19) { if (TileManager.tileMap[y][x] > 19) {
TileManager.tileMap[y][x] = 0; TileManager.tileMap[y][x] = 0;
......
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