Class ItemFactory

java.lang.Object
com.csse3200.game.entities.factories.ItemFactory

public class ItemFactory extends Object
Factory to create item entities with predefined components.
  • Method Details

    • createGrenade

      public static Entity createGrenade()
      Creates a grenade entity. Damages enemies in a short radius.
      Returns:
      a grenade item entity
    • createCoffee

      public static Entity createCoffee()
      Creates a coffee entity. Place on a "plant" to give it a temporary attack speed bonus.
      Returns:
      a coffee item entity
    • createBuff

      public static Entity createBuff()
      Creates a buff entity. Place on a "plant" to heal it and double it's max health.
      Returns:
      a buff item entity
    • createEmp

      public static Entity createEmp()
      Creates an EMP entity. Stuns enemies in a short radius.
      Returns:
      an emp item entity
    • createNuke

      public static Entity createNuke()
      Creates a nuke entity. Place anywhere on screen to destroy all entities, friend and foe.
      Returns:
      a nuke item entity