Class StationServingComponent
java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.station.StationServingComponent
StationServingComponent.java
StationServingComponent gives the station the ability to submit a meal to be
able to be served to a customer. This will specifically be used by the
serving bench 'station'.
submitMeal(ItemComponent)
: Function which controls the submission of a meal by the
class.
This component is currently incomplete and will need to be finished.-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canSubmitMeal
(ItemComponent item) checkSubmit
(ItemComponent item) void
create()
On creation a listener for Submit Meal will be added to the station.void
handleInteraction
(InventoryComponent playerInventoryComponent, InventoryDisplay inventoryDisplay, String type) Handles any interaction with station, using current state of player and station inventory to determine intended interactionvoid
setGoldMultiplier
(int multiplier) Sets the gold multipliervoid
submitMeal
(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 submissionMethods inherited from class com.csse3200.game.components.Component
dispose, earlyUpdate, getEntity, setEnabled, setEntity, toString, triggerEarlyUpdate, triggerUpdate, update
-
Constructor Details
-
StationServingComponent
public StationServingComponent()
-
-
Method Details
-
create
public void create()On creation a listener for Submit Meal will be added to the station. -
canSubmitMeal
-
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 componentinventoryDisplay
- reference to individual inventory displaytype
- the type of interaction attempt
-
checkSubmit
-
submitMeal
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
-
setGoldMultiplier
public void setGoldMultiplier(int multiplier) Sets the gold multiplier- Parameters:
multiplier
- the multiplier desired
-