@@ -277,7 +277,7 @@ public abstract class BulletType extends Content{
|
||||
bullet.damage = damage < 0 ? this.damage : damage;
|
||||
bullet.add();
|
||||
|
||||
if(keepVelocity && owner instanceof Hitboxc) bullet.vel.add(((Hitboxc)owner).deltaX() / Time.delta, ((Hitboxc)owner).deltaY() / Time.delta);
|
||||
if(keepVelocity && owner instanceof Hitboxc) bullet.vel.add(((Velc)owner).vel().x, ((Velc)owner).vel().y);
|
||||
return bullet;
|
||||
|
||||
}
|
||||
|
||||
@@ -66,12 +66,14 @@ public class LaserBulletType extends BulletType{
|
||||
int f = idx++;
|
||||
|
||||
for(int s : Mathf.signs){
|
||||
Time.run(f * lightningDelay, () ->
|
||||
Lightning.create(b, lightningColor,
|
||||
lightningDamage < 0 ? damage : lightningDamage,
|
||||
cx, cy, rot + 90*s + Mathf.range(lightningAngleRand),
|
||||
lightningLength + Mathf.random(lightningLengthRand))
|
||||
);
|
||||
Time.run(f * lightningDelay, () -> {
|
||||
if(b.isAdded() && b.type == this){
|
||||
Lightning.create(b, lightningColor,
|
||||
lightningDamage < 0 ? damage : lightningDamage,
|
||||
cx, cy, rot + 90*s + Mathf.range(lightningAngleRand),
|
||||
lightningLength + Mathf.random(lightningLengthRand));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user