@Override public void applyBombs() { // Make sure all of the aeros have their bombs applied, otherwise // problems // once the bombs are applied, the choices are cleared, so it's not an // issue if the bombs are applied twice for an Aero for (Integer fId : fighters) { IBomber fighter = (IBomber) game.getEntity(fId); fighter.applyBombs(); } computeSquadronBombLoadout(); }
/** * Unload the given unit. TODO: need to strip out ammo * * @param unit * - the <code>Entity</code> to be unloaded. * @return <code>true</code> if the unit was contained in this space, * <code>false</code> otherwise. */ @Override public boolean unload(Entity unit) { // Remove the unit if we are carrying it. boolean success = fighters.removeElement(unit.getId()); if (game.getPhase() != Phase.PHASE_LOUNGE) { computeSquadronBombLoadout(); // updateWeaponGroups() and loadAllWeapons() are called in // computeSquadronBombLoadout() } else { updateWeaponGroups(); loadAllWeapons(); } updateSkills(); return success; }