Class ExplosionFactory

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

public class ExplosionFactory extends Object
Factory to create explosion entities.
  • Constructor Details

    • ExplosionFactory

      public ExplosionFactory()
  • Method Details

    • createExplosion

      public static Entity createExplosion(com.badlogic.gdx.math.Vector2 position, float radius)
      Creates an explosion entity. The entity will play its animation and then dispose of itself.
      Parameters:
      position - The position where the explosion should occur.
      radius - The radius of the explosion, used to calculate the visual size of the animation.
      Returns:
      A new explosion entity.
    • getExplosionPosition

      public static com.badlogic.gdx.math.Vector2 getExplosionPosition(com.badlogic.gdx.math.Vector2 position, float visualScale)