Package mindustry.entities.pattern
Class ShootAlternate
java.lang.Object
mindustry.entities.pattern.ShootPattern
mindustry.entities.pattern.ShootAlternate
- All Implemented Interfaces:
Cloneable
-
Nested Class Summary
Nested classes/interfaces inherited from class mindustry.entities.pattern.ShootPattern
ShootPattern.BulletHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
offset of barrel to start onint
number of barrels used for shooting.boolean
If true, the shoot order is flipped.float
spread between barrels, in world units - not degrees.Fields inherited from class mindustry.entities.pattern.ShootPattern
firstShotDelay, shotDelay, shots
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
flip()
Subclasses should override this to flip its sides.void
shoot
(int totalShots, ShootPattern.BulletHandler handler, Runnable barrelIncrementer) Called on a single "trigger pull".Methods inherited from class mindustry.entities.pattern.ShootPattern
copy, shoot
-
Field Details
-
barrels
public int barrelsnumber of barrels used for shooting. -
spread
public float spreadspread between barrels, in world units - not degrees. -
barrelOffset
public int barrelOffsetoffset of barrel to start on -
mirror
public boolean mirrorIf 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 classShootPattern
-
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 classShootPattern
-