Class ShootAlternate

java.lang.Object
mindustry.entities.pattern.ShootPattern
mindustry.entities.pattern.ShootAlternate
All Implemented Interfaces:
Cloneable

public class ShootAlternate extends ShootPattern
  • Field Details

    • barrels

      public int barrels
      number of barrels used for shooting.
    • spread

      public float spread
      spread between barrels, in world units - not degrees.
    • barrelOffset

      public int barrelOffset
      offset of barrel to start on
    • mirror

      public boolean mirror
      If true, the shoot order is flipped.
  • Constructor Details

    • ShootAlternate

      public ShootAlternate(float spread)
    • ShootAlternate

      public ShootAlternate()
  • Method Details

    • flip

      public void flip()
      Description copied from class: ShootPattern
      Subclasses should override this to flip its sides.
      Overrides:
      flip in class ShootPattern
    • shoot

      public void shoot(int totalShots, ShootPattern.BulletHandler handler, @Nullable Runnable barrelIncrementer)
      Description copied from class: ShootPattern
      Called on a single "trigger pull". This function should call the handler with any bullets that result.
      Overrides:
      shoot in class ShootPattern