Class ItemComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.items.ItemComponent

public class ItemComponent extends Component
  • Constructor Details

    • ItemComponent

      public ItemComponent()
  • Method Details

    • getName

      public String getName()
      Returns the name of this item.
      Returns:
      the item's name
    • setName

      public void setName(String name)
      Sets the name of this item.
      Parameters:
      name - the new name for the item
    • getType

      public ItemTypes getType()
      Returns the type of this item.
      Returns:
      the item's ItemTypes type
    • setType

      public void setType(ItemTypes type)
      Sets the type of this item.
      Parameters:
      type - the ItemTypes to assign to this item
    • getCount

      public int getCount()
      Gets the current number of existing items that are the same within the game
      Returns:
      the count for the item
    • setCount

      public void setCount(int count)
      setCount to set item_count at a given value
      Parameters:
      count - sets the item count
    • setTexture

      public void setTexture(String texture)
      Sets the texture path of the current item
      Parameters:
      texture - sets the texture path of the current item
    • getTexture

      public String getTexture()
      Returns the texture path of the current item
    • getDescription

      public String getDescription()
      Gets the description for the item
      Returns:
      A formatted description of the item with its; name, id, type, and current count.