Fixed build errors
This commit is contained in:
@@ -21,6 +21,8 @@ public class AmmoType {
|
||||
public final float quantityMultiplier;
|
||||
/**Reload speed multiplier.*/
|
||||
public float speedMultiplier = 1f;
|
||||
/**Bullet recoil strength.*/
|
||||
public float recoil = 0f;
|
||||
/**Effect created when shooting.*/
|
||||
public Effect shootEffect = Fx.none;
|
||||
/**Extra smoke effect created when shooting.*/
|
||||
|
||||
@@ -94,10 +94,15 @@ public class Weapon extends Upgrade{
|
||||
|
||||
void shootInternal(Player p, float x, float y, float rotation, boolean left){
|
||||
Angles.shotgun(shots, spacing, rotation, f -> bullet(p, x, y, f + Mathf.range(inaccuracy)));
|
||||
tr.trns(rotation, 3f);
|
||||
|
||||
AmmoType type = p.inventory.getAmmo();
|
||||
|
||||
tr.trns(rotation + 180f, type.recoil);
|
||||
|
||||
p.velocity.add(tr);
|
||||
|
||||
tr.trns(rotation, 3f);
|
||||
|
||||
Effects.shake(shake, shake, x, y);
|
||||
Effects.effect(ejectEffect, x, y, rotation * -Mathf.sign(left));
|
||||
Effects.effect(type.shootEffect, x + tr.x, y + tr.y, rotation, p);
|
||||
|
||||
Reference in New Issue
Block a user