Class UpgradesComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.collectables.CollectableComponent
com.csse3200.game.components.collectables.UpgradesComponent
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Called when this collectable is picked up by the player.Methods inherited from class com.csse3200.game.components.collectables.CollectableComponent
create
Methods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Field Details
-
upgradeId
-
-
Constructor Details
-
UpgradesComponent
-
-
Method Details
-
onCollect
Description copied from class:CollectableComponent
Called when this collectable is picked up by the player.- Specified by:
onCollect
in classCollectableComponent
- Parameters:
player
- the player entity collecting this item- Returns:
- true if collection succeeded (and the item should be removed), false otherwise
-
getUpgradeId
-