Skip to content

Commit

Permalink
Remove unused imports and redundant blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lenhatminh451 committed Oct 16, 2023
1 parent 6789360 commit 9441faa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.csse3200.game.components.tower;

import com.badlogic.gdx.audio.Sound;
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.services.ServiceLocator;

/**
* Listens for events relevant to a weapon tower state.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package com.csse3200.game.components.tower;

import com.badlogic.gdx.audio.Sound;
import com.csse3200.game.components.Component;
import com.csse3200.game.rendering.AnimationRenderComponent;
import com.csse3200.game.services.ServiceLocator;

/**
* Listens to triggers phrases and executes the required animations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import com.csse3200.game.components.CombatStatsComponent;
import com.csse3200.game.components.Component;

import static com.csse3200.game.screens.TowerType.INCOME;

/**
* Listens for an event from the popup menu to upgrade
* the turret entity this component is attached to.
Expand All @@ -29,12 +27,11 @@ public void create() {
*/
public void upgradeTower(UPGRADE upgradeType, int value) {
switch (upgradeType) {
case INCOME -> {getEntity().getEvents().trigger("addIncome", value);}
case ATTACK -> {upgradeTowerAttack(value);}
case MAXHP -> {upgradeTowerMaxHealth( value);}
case FIRERATE -> {getEntity().getEvents().trigger("addFireRate", value);}
case REPAIR -> {repairTower();}

case INCOME -> getEntity().getEvents().trigger("addIncome", value);
case ATTACK -> upgradeTowerAttack(value);
case MAXHP -> upgradeTowerMaxHealth( value);
case FIRERATE -> getEntity().getEvents().trigger("addFireRate", value);
case REPAIR -> repairTower();
}
}

Expand Down

0 comments on commit 9441faa

Please sign in to comment.