Class ResourceStatsComponent


public class ResourceStatsComponent extends WorkerInventoryComponent
  • Constructor Details

    • ResourceStatsComponent

      public ResourceStatsComponent(int wood, int stone, int metal)
  • Method Details

    • isDead

      public Boolean isDead()
      Returns true if the entity has 0 wood and 0 stone and 0 metal, otherwise false.
      Returns:
      is resource dead
    • collectStone

      public int collectStone(CollectStatsComponent collector)
      Collects stone
    • collectWood

      public int collectWood(CollectStatsComponent collector)
      Collects stone
    • collectMetal

      public int collectMetal(CollectStatsComponent collector)