Package mindustry.entities.pattern
Class ShootPattern
java.lang.Object
mindustry.entities.pattern.ShootPattern
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
ShootAlternate,ShootBarrel,ShootHelix,ShootMulti,ShootSine,ShootSpread,ShootSummon
Handles different types of bullet patterns for shooting.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfloatdelay in ticks before first shotfloatdelay in ticks between shotsintamount of shots per "trigger pull" -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()voidflip()Subclasses should override this to flip its sides.voidshoot(int totalShots, ShootPattern.BulletHandler handler) Called on a single "trigger pull".voidshoot(int totalShots, ShootPattern.BulletHandler handler, Runnable barrelIncrementer) Called on a single "trigger pull".
-
Field Details
-
shots
public int shotsamount of shots per "trigger pull" -
firstShotDelay
public float firstShotDelaydelay in ticks before first shot -
shotDelay
public float shotDelaydelay 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
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
-