Parentize Vela and Corvus shoot effects (#5997)
This commit is contained in:
@@ -362,13 +362,13 @@ public class Fx{
|
||||
|
||||
Fill.circle(e.x, e.y, e.fin() * 10);
|
||||
Drawf.light(e.x, e.y, e.fin() * 20f, Pal.heal, 0.7f);
|
||||
}),
|
||||
}).followParent(true),
|
||||
|
||||
greenLaserChargeSmall = new Effect(40f, 100f, e -> {
|
||||
color(Pal.heal);
|
||||
stroke(e.fin() * 2f);
|
||||
Lines.circle(e.x, e.y, e.fout() * 50f);
|
||||
}),
|
||||
}).followParent(true),
|
||||
|
||||
greenCloud = new Effect(80f, e -> {
|
||||
color(Pal.heal);
|
||||
|
||||
@@ -446,6 +446,7 @@ public class UnitTypes implements ContentList{
|
||||
x = y = 0f;
|
||||
|
||||
firstShotDelay = Fx.greenLaserChargeSmall.lifetime - 1f;
|
||||
parentizeEffects = true;
|
||||
|
||||
reload = 155f;
|
||||
recoil = 0f;
|
||||
@@ -535,6 +536,7 @@ public class UnitTypes implements ContentList{
|
||||
shootStatusDuration = 60f * 2f;
|
||||
shootStatus = StatusEffects.unmoving;
|
||||
firstShotDelay = Fx.greenLaserCharge.lifetime;
|
||||
parentizeEffects = true;
|
||||
|
||||
bullet = new LaserBulletType(){{
|
||||
length = 460f;
|
||||
|
||||
@@ -91,6 +91,8 @@ public class Weapon implements Cloneable{
|
||||
public boolean ignoreRotation = false;
|
||||
/** min velocity required for this weapon to shoot */
|
||||
public float minShootVelocity = -1f;
|
||||
/** should the shoot effects follow the unit (effects need followParent set to true for this to work) */
|
||||
public boolean parentizeEffects;
|
||||
/** internal value used for alternation - do not change! */
|
||||
public int otherSide = -1;
|
||||
/** sound used for shooting */
|
||||
@@ -333,7 +335,7 @@ public class Weapon implements Cloneable{
|
||||
Angles.shotgun(shots, spacing, rotation, f -> mount.bullet = bullet(unit, shootX, shootY, f + Mathf.range(inaccuracy), lifeScl));
|
||||
}
|
||||
|
||||
boolean parentize = ammo.keepVelocity;
|
||||
boolean parentize = ammo.keepVelocity || parentizeEffects;
|
||||
|
||||
if(delay){
|
||||
Time.run(firstShotDelay, () -> {
|
||||
|
||||
Reference in New Issue
Block a user