Class LoanUpgrade
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.upgrades.LoanUpgrade
- All Implemented Interfaces:
Upgrade
Manages the Loan Upgrade component, allowing players to take a loan
to receive additional gold under certain conditions.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate
-
Constructor Details
-
LoanUpgrade
public LoanUpgrade()
-
-
Method Details
-
activate
public void activate()Activates the loan upgrade, providing the player with additional gold if they have at least 20 gold -
deactivate
public void deactivate()Deactivates the loan upgrade- Specified by:
deactivate
in interfaceUpgrade
-
update
public void update()Description copied from class:Component
Called once per frame of the game, and should be used for most component logic. Not called if component is disabled.
-