Class ExplosionFactory
java.lang.Object
com.csse3200.game.entities.factories.ExplosionFactory
Factory to create explosion entities.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Entity
createExplosion
(com.badlogic.gdx.math.Vector2 position, float radius) Creates an explosion entity.static com.badlogic.gdx.math.Vector2
getExplosionPosition
(com.badlogic.gdx.math.Vector2 position, float visualScale)
-
Constructor Details
-
ExplosionFactory
public ExplosionFactory()
-
-
Method Details
-
createExplosion
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)
-