Skip to content

Commit

Permalink
Revert "Merge branch 'Team-5--Economy' of github.com:UQcsse3200/2023-…
Browse files Browse the repository at this point in the history
…studio-3 into Team-5--Economy"

This reverts commit 04234d8, reversing
changes made to db07558.
  • Loading branch information
Hasakev committed Sep 12, 2023
1 parent c62dd96 commit cd26474
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 29 deletions.
36 changes: 14 additions & 22 deletions source/core/src/main/com/csse3200/game/screens/TowerType.java
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
package com.csse3200.game.screens;

public enum TowerType {
WEAPON("images/towers/turret_deployed.png", "Weapon Tower",
"The Weapon Tower is a simple and basic turret that fires rapid shots at enemies dealing damage over time."),
TNT("images/towers/turret_deployed.png", "TNT Tower",
"The TNT Tower launches explosive projectiles, dealing area damage to groups of enemies."),
DROID("images/towers/turret_deployed.png", "Droid Tower",
"Droid Towers deploy robotic helpers that assist in combat and provide support to nearby turrets."),
WALL("images/towers/turret_deployed.png", "Wall Tower",
"The Wall Tower creates barriers to block enemy paths, slowing down their progress."),
FIRE("images/towers/turret_deployed.png", "Fire Tower",
"The Fire Tower emits flames, causing damage over time to enemies caught in its fiery radius."),
STUN("images/towers/turret_deployed.png", "Stun Tower",
"The Stun Tower releases electric shocks that temporarily immobilize and damage enemies."),
INCOME("images/towers/turret_deployed.png", "Income Tower",
"The Income Tower generates additional in-game currency over time.");
WEAPON("images/towers/turret_deployed.png", "Weapon Tower"),
TNT("images/towers/turret_deployed.png", "TNT Tower"),
DROID("images/towers/turret_deployed.png", "Droid Tower"),
WALL("images/towers/turret_deployed.png", "Wall Tower"),
FIRE("images/towers/turret_deployed.png", "Fire Tower"),
STUN("images/towers/turret_deployed.png", "Stun Tower"),
INCOME("images/towers/turret_deployed.png", "Income Tower");

private final String imagePath;
private final String towerName;
private final String description;

TowerType(String imagePath, String towerName, String description) {
TowerType(String imagePath, String towerName) {
this.imagePath = imagePath;
this.towerName = towerName;
this.description = description;
}

public String getImagePath() { return imagePath; }

public String getTowerName() { return towerName; }

public String getDescription() { return description; }
public String getImagePath() {
return imagePath;
}

public String getTowerName() {
return towerName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,6 @@ public void clicked(InputEvent event, float x, float y) {
// Add the image to the nested table
turretTable.add(turretImage).pad(10).row();

// Create a label for the turret description
Label turretDescriptionLabel = new Label(turret.getDescription(), skin);
turretDescriptionLabel.setWrap(true); // Wrap text if it's too long

// Add the description label to the nested table
turretTable.add(turretDescriptionLabel).center().width(200).pad(10).row(); // Adjust width if needed

// Create a TextButton for the turret name
TextButton turretButton = new TextButton(turret.getTowerName(), skin);
turretButton.addListener(new ClickListener() {
Expand Down

0 comments on commit cd26474

Please sign in to comment.