Class ConsumableFactory

java.lang.Object
com.csse3200.game.entities.factories.items.ConsumableFactory

public class ConsumableFactory extends Object
Factory class responsible for creating consumable items in the game.

Consumables can either be standard items that apply effects directly or projectile-based items (e.g., bombs or throwable items) that use RangedUseComponent and WeaponsStatsComponent.

  • Constructor Details

    • ConsumableFactory

      public ConsumableFactory()
  • Method Details

    • createConsumable

      public static Entity createConsumable(Consumables consumableType)
      Creates a consumable entity of the specified type.

      The returned entity will have:

      Parameters:
      consumableType - the type of consumable to create
      Returns:
      the created consumable entity