Class LaserFactory
java.lang.Object
com.csse3200.game.entities.factories.LaserFactory
A class full of static methods which construct different laser entity types
-
Method Summary
Modifier and TypeMethodDescriptionstatic EntitycreateLaser(float dir, com.badlogic.gdx.graphics.Color color, Component laserBehavior) Creates a new laser emitter entity which is rotated bydirdegrees.static EntitycreateLaserEmitter(float dir) static EntitycreateLaserShower(float dir) Creates a blue laser shower.
-
Method Details
-
createLaser
public static Entity createLaser(float dir, com.badlogic.gdx.graphics.Color color, Component laserBehavior) Creates a new laser emitter entity which is rotated bydirdegrees. The laser is able to damage players and also reflect off of colliders with thePhysicsLayer.LASER_REFLECTORlayer.- Parameters:
dir- direction for the initial laser beam to face in degrees- Returns:
- the newly created laser emitter entity
-
createLaserEmitter
-
createLaserShower
Creates a blue laser shower.
-