Class StationCollectionComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.station.StationCollectionComponent

public class StationCollectionComponent extends Component
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.
  • Constructor Details

    • StationCollectionComponent

      public StationCollectionComponent()
  • Method Details

    • collectItem

      public Entity collectItem(String itemType)
      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