Class StationBinComponent

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

public class StationBinComponent extends Component
StationBinComponent.java StationBinComponent throughs away an item
  • Constructor Details

    • StationBinComponent

      public StationBinComponent()
  • Method Details

    • create

      public void create()
      On creation a listener for Submit Meal will be added to the station.
      Overrides:
      create in class Component
    • handleInteraction

      public void handleInteraction(InventoryComponent playerInventoryComponent, InventoryDisplay inventoryDisplay, String type)
      Handles any interaction with station, using current state of player and station inventory to determine intended interaction
      Parameters:
      playerInventoryComponent - reference to player inventory component
      inventoryDisplay - reference to individual inventory display
      type - the type of interaction attempt
    • disposeItem

      public void disposeItem(ItemComponent item)
      Function which calls to identify the current ticket info, as well as the item in the inventory Calls another function which grades the submission
      Parameters:
      item - reference to the item being submitted by the user