public void PowerUpEffect(PowerUp powerUp, Tank tank) { if (powerUp == Health) { game.uiManager.floatingPowerUpText("+100 Health", tank.getTankPos()); tank.healTank(100); } if (powerUp == HeavyShot) { game.uiManager.floatingPowerUpText("Heavy Shot +1", tank.getTankPos()); tank.inventory.incrementShot(BulletType.HeavyShot); } if (powerUp == ScatterShot) { game.uiManager.floatingPowerUpText("ScatterShot +1", tank.getTankPos()); tank.inventory.incrementShot(BulletType.ScatterShot); } if (powerUp == ExtraMovement) { game.uiManager.floatingPowerUpText("Move Limit +3", tank.getTankPos()); tank.moveLimit += 3; } if (powerUp == ShieldPower) { game.uiManager.floatingPowerUpText("Shield", tank.getTankPos()); updateShield(tank.getTankPos()); } }
public void PowerUpEffect(PowerUp powerUp, Tank tank) { if (powerUp == Health) { game.uiManager.floatingPowerUpText("+100 Health", tank.getTankPos()); tank.healTank(100); } if (powerUp == HeavyShot) { game.uiManager.floatingPowerUpText("Heavy Shot +1", tank.getTankPos()); tank.inventory.incrementShot(BulletType.HeavyShot); } if (powerUp == ScatterShot) { game.uiManager.floatingPowerUpText("ScatterShot +1", tank.getTankPos()); tank.inventory.incrementShot(BulletType.ScatterShot); } if (powerUp == ExtraMovement) { game.uiManager.floatingPowerUpText("Move Limit +3", tank.getTankPos()); tank.moveLimit += 3; } if (powerUp == ShieldPower) { game.uiManager.floatingPowerUpText("Shield", tank.getTankPos()); updateShield(tank.getTankPos()); } }