/** * Adds bomb to the mapObjects. If Upgrade bombRemote has been collected the bomb object will be * added to a list of actual planted bombs. * * @param cm collision map */ public void plantBomb(BufferedImage cm) { if (!reachedMaxBombs()) { Bomb bomb = new Bomb( getPosX(), getPosY(), true, false, false, "simplebomb", map.getGraphics(), bombradius, cm, ID); bomb.setMap(getMap()); map.getMapObjects().get(1).add(bomb); addBomb(); if (!bombRemote) { bomb.activateBomb(); } else { remoteBombs.add(bomb); } } }