Skip to content

Commit

Permalink
Changed the income amount from 50 to 30
Browse files Browse the repository at this point in the history
  • Loading branch information
ThivanW committed Oct 15, 2023
1 parent 5ce75c1 commit 07ca336
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class CurrencyTask extends DefaultTask implements PriorityTask {
private long endTime;
private int interval;
private final Scrap scrap = new Scrap(); // currency to update
private final int currencyAmount = scrap.getAmount(); // amount of currency to update
private final int currencyAmount = 30; // amount of currency to update
private static final String IDLE = "idleStartEco";
private static final String MOVE = "moveStartEco";
private static final String DEATH = "deathStartEco";
Expand Down Expand Up @@ -49,7 +49,6 @@ public CurrencyTask(int priority, int interval) {
public void start() {
super.start();
owner.getEntity().getEvents().addListener("addIncome",this::changeInterval);
// TODO: changed 30 TIMES MULTIPLIER to 5 times
endTime = timeSource.getTime() + (interval * 1500L);
owner.getEntity().getEvents().trigger(IDLE);
}
Expand Down Expand Up @@ -98,11 +97,11 @@ public void updateTowerState() {
* Updates the currency based on time intervals.
*/
public void updateCurrency() {
//logger.info("Updating currency");
ServiceLocator.getCurrencyService().getScrap().modify(currencyAmount/2);
logger.info("Updating currency");
ServiceLocator.getCurrencyService().getScrap().modify(currencyAmount);

Vector2 coordinates = this.owner.getEntity().getCenterPosition();
ServiceLocator.getCurrencyService().getDisplay().currencyPopUp(coordinates.x, coordinates.y, currencyAmount/2, 25);
ServiceLocator.getCurrencyService().getDisplay().currencyPopUp(coordinates.x, coordinates.y, currencyAmount, 25);

ServiceLocator.getCurrencyService().getDisplay().updateScrapsStats(); // update currency display

Expand Down

0 comments on commit 07ca336

Please sign in to comment.