Class LaserDetectorFactory

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

public class LaserDetectorFactory extends Object
This is just a class of static methods used to assemble new laser detector entities. They're able to detect when a laser is hitting them and then trigger an event when the state is changed.
  • Method Details

    • createLaserDetector

      public static Entity createLaserDetector()
      Creates a new laser detector entity facing upright (unrotated)
      Returns:
      the newly created laser detector entity
    • createLaserDetector

      public static Entity createLaserDetector(float dir)
      Creates a new laser detector entity with a rotation of dir.
      Parameters:
      dir - the rotation in degrees
      Returns:
      the newly created laser detector entity