Class CookIngredientComponent


public class CookIngredientComponent extends ItemTimerComponent
The CookIngredientComponent handles the cooking process for an ingredient in the game. It manages the state of cooking, determines when the cooking is complete, and triggers the appropriate actions based on the cooking status and the station's state.
  • Constructor Details

    • CookIngredientComponent

      public CookIngredientComponent()
      CookIngredientComponent constructor, takes no parameters as the length of time that the timer goes for must be set manually.
  • Method Details

    • create

      public void create()
      Description copied from class: Component
      Called when the entity is created and registered. Initial logic such as calls to GetComponent should be made here, not in the constructor which is called before an entity is finished.
      Overrides:
      create in class Component
    • update

      public void update()
      Description copied from class: ItemTimerComponent
      Function to run each frame
      Overrides:
      update in class ItemTimerComponent
    • updateItem

      protected void updateItem()
      Update the item component to reflect its new state.
      Specified by:
      updateItem in class ItemTimerComponent
    • getIsCooking

      public boolean getIsCooking()
      Get if the item is currently cooking
      Returns:
      true if the item is cooking, false otherwise.