Class ProjectileFactory

java.lang.Object
com.deco2800.game.entities.factories.ProjectileFactory

public class ProjectileFactory extends Object
  • Method Details

    • createBaseProjectile

      public static Entity createBaseProjectile(Entity ownerEntity, Entity target)
      Creates base entity of projectile
      Parameters:
      ownerEntity - the entity that throws this projectile
      target - the entity that this projectile is thrown at
      Returns:
      the base of projectile
    • createPoopsSludge

      public static Entity createPoopsSludge(Entity ownerEntity, Entity target)
      Create poop sludge projectile
      Parameters:
      ownerEntity - the entity that throws this projectile
      target - the entity that this projectile is thrown at
      Returns:
      the poop sludge projectile
    • createDiscus

      public static Entity createDiscus(Entity ownerEntity, Entity target)
      Create discus projectile
      Parameters:
      ownerEntity - the entity that throws this projectile
      target - the entity that this projectile is thrown at
      Returns:
      the discus projectile
    • createWrenchPlayerProjectile

      public static Entity createWrenchPlayerProjectile(Entity player, double angle)
      Creates a non-colliding wrench projectile shooting in the walk direction of the player which damages enemies.
      Parameters:
      player - the player entity
      angle - the angle in multiples of pi radians, angle = 2 = 360deg (2pi radians) from the walk direction of the player
      Returns:
      the projectile entity
    • createBasePlayerProjectile

      public static Entity createBasePlayerProjectile(Entity player, double angle)
      Creates a non-colliding projectile shooting in the walk direction of the player which damages enemies. Uses animations from images/Skills/projectileSprites.png
      Parameters:
      player - the player entity
      angle - the angle in multiples of pi radians, angle = 2 = 360deg (2pi radians) from the walk direction of the player
      Returns:
      the projectile entity
    • createWeaponProjectile

      public static Entity createWeaponProjectile(Entity player, double angle)
      Creates a non-colliding projectile shooting in the walk direction of the player (thank YOU TEAM 08 KURT) which damages enemies.
      Parameters:
      player - the player entity
      angle - the angle in multiples of pi radians, angle = 2 = 360deg (2pi radians) from the walk direction of the player
      Returns:
      the projectile entity
    • createPlayerAOE

      public static Entity createPlayerAOE(Entity player, double angle)
      Creates an AOE attack. It is functionally a projectile with no movement.
      Parameters:
      player - the player entity
      angle - the angle in multiples of pi radians, angle = 2 = 360deg (2pi radians) from the walk direction of the player
      Returns:
      the projectile entity