Class ShootPattern

java.lang.Object
mindustry.entities.pattern.ShootPattern
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ShootAlternate, ShootBarrel, ShootHelix, ShootMulti, ShootSine, ShootSpread, ShootSummon

public class ShootPattern extends Object implements Cloneable
Handles different types of bullet patterns for shooting.
  • Field Details

    • shots

      public int shots
      amount of shots per "trigger pull"
    • firstShotDelay

      public float firstShotDelay
      delay in ticks before first shot
    • shotDelay

      public float shotDelay
      delay in ticks between shots
  • Constructor Details

    • ShootPattern

      public ShootPattern()
  • Method Details

    • shoot

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

      public void shoot(int totalShots, ShootPattern.BulletHandler handler)
      Called on a single "trigger pull". This function should call the handler with any bullets that result.
    • flip

      public void flip()
      Subclasses should override this to flip its sides.
    • copy

      public ShootPattern copy()