mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-25 14:01:03 -08:00
Weapon utility handleBullet method
This commit is contained in:
parent
bf91676fea
commit
9212c178fc
1 changed files with 6 additions and 0 deletions
|
|
@ -408,6 +408,7 @@ public class Weapon implements Cloneable{
|
|||
angle = angleOffset + shootAngle + Mathf.range(inaccuracy);
|
||||
|
||||
mount.bullet = bullet.create(unit, unit.team, bulletX, bulletY, angle, -1f, (1f - velocityRnd) + Mathf.random(velocityRnd), lifeScl, null, mover, mount.aimX, mount.aimY);
|
||||
handleBullet(unit, mount, mount.bullet);
|
||||
|
||||
if(!continuous){
|
||||
shootSound.at(bulletX, bulletY, Mathf.random(soundPitchMin, soundPitchMax));
|
||||
|
|
@ -423,6 +424,11 @@ public class Weapon implements Cloneable{
|
|||
mount.heat = 1f;
|
||||
}
|
||||
|
||||
//override to do special things to a bullet after spawning
|
||||
protected void handleBullet(Unit unit, WeaponMount mount, Bullet bullet){
|
||||
|
||||
}
|
||||
|
||||
public void flip(){
|
||||
x *= -1;
|
||||
shootX *= -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue