Class UpgradesComponent


public class UpgradesComponent extends CollectableComponent
  • Field Details

    • upgradeId

      public final String upgradeId
  • Constructor Details

    • UpgradesComponent

      public UpgradesComponent(String upgradeId)
  • Method Details

    • onCollect

      protected boolean onCollect(Entity player)
      Description copied from class: CollectableComponent
      Called when this collectable is picked up by the player.
      Specified by:
      onCollect in class CollectableComponent
      Parameters:
      player - the player entity collecting this item
      Returns:
      true if collection succeeded (and the item should be removed), false otherwise
    • getUpgradeId

      public String getUpgradeId()