Class StationCollectionComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.station.StationCollectionComponent
StationCollectionComponent.java
StationCollectionComponentAllows for items to be collected from a station. It
works by being able to create an item when the player interacted with a
collection station. This includes the fridge and collection basket.
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncollectItem(String itemType) Attempts to collect the specified item from the station.Methods inherited from class com.csse3200.game.components.Component
create, dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
StationCollectionComponent
public StationCollectionComponent()
-
-
Method Details
-
collectItem
Attempts to collect the specified item from the station.- Parameters:
itemType- the type of item to be collected- Returns:
- the item if sucessful, null otherwise.
- Require:
- itemType is a valid type of item from the station
-