Class CostComponent

java.lang.Object
com.csse3200.game.components.Component
com.csse3200.game.components.CostComponent

public class CostComponent extends Component
Component used to store information related to cost. Any entities that necessitate a cost should register an instance of this class.
  • Constructor Details

    • CostComponent

      public CostComponent(int cost)
  • Method Details

    • setCost

      public void setCost(int cost)
      Sets the entity's cost. Cost has a minimum bound of 0.
      Parameters:
      cost -
    • getCost

      public int getCost()
      Returns the entity's cost
      Returns:
      entity's cost