Skip to content

Commit

Permalink
Made the turret adding process more dynaic
Browse files Browse the repository at this point in the history
  • Loading branch information
Hasakev committed Sep 11, 2023
1 parent 7746e59 commit 338a803
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,8 @@ public TurretSelectionScreen(GdxGame game) {

turretList = new ArrayList<>();
// Add turrets to the list
turretList.add(TowerType.WEAPON);
turretList.add(TowerType.TNT);
turretList.add(TowerType.DROID);
turretList.add(TowerType.WALL);
turretList.add(TowerType.FIRE);
turretList.add(TowerType.STUN);
turretList.add(TowerType.INCOME);

turretList.addAll(Arrays.asList(TowerType.values()));
// Restrictions can be added to the arrays i.e. map == "Forest" && level == 1


Skin skin = new Skin(Gdx.files.internal("flat-earth/skin/flat-earth-ui.json"));
Expand Down Expand Up @@ -143,6 +137,10 @@ public void render(float delta) {
stage.draw();
}

public List<TowerType> getTurretList() {
return turretList;
}

@Override
public void dispose() {
stage.dispose();
Expand Down

0 comments on commit 338a803

Please sign in to comment.