Class CollectStatsComponent

java.lang.Object
com.deco2800.game.components.Component
com.deco2800.game.worker.components.CollectStatsComponent

public class CollectStatsComponent extends Component
  • Constructor Details

    • CollectStatsComponent

      public CollectStatsComponent(int collectionAmount)
  • Method Details

    • getCollectionAmount

      public int getCollectionAmount()
      Returns the amount which entity can collect.
      Returns:
      amount to collect
    • setCollectionAmount

      public void setCollectionAmount(int collectionAmount)
      Sets the entity's collection amount. Collection amount has a minimum bound of 0.
      Parameters:
      collectionAmount - collection amount
    • addCollectionAmount

      public void addCollectionAmount(int collectionAmount)
      Adds to the amount which an entity can collect. The amount added can be negative.
      Parameters:
      collectionAmount - collection amount to add