Improved max charge puff dust

This commit is contained in:
Dominic authored and Cameron Ewell committed 2022-08-24 22:59:05 -04:00
1 parent 182323c26f
commit 63d3c6d8e0
1 file changed
+6 -6
+6 -6
View File
@@ -16,7 +16,7 @@ namespace CalamityMod.Projectiles.Ranged
{
public bool OwnerCanShoot => Owner.HasAmmo(Owner.ActiveItem()) && !Owner.noItems && !Owner.CCed;
public float StringReelbackInterpolant => Utils.GetLerpValue(4f, HeavenlyGale.ShootDelay, ChargeTimer, true);
public float StringReelbackInterpolant => Utils.GetLerpValue(4f, Owner.ActiveItem().useAnimation * 0.6f, Owner.ActiveItem().useAnimation - ShootDelay, true);
public float ChargeupInterpolant => Utils.GetLerpValue(HeavenlyGale.ShootDelay, HeavenlyGale.MaxChargeTime, ChargeTimer, true);
@@ -114,9 +114,9 @@ namespace CalamityMod.Projectiles.Ranged
if (ChargeTimer == HeavenlyGale.MaxChargeTime)
{
SoundEngine.PlaySound(SoundID.Item158, Projectile.Center);
for (int i = 0; i < 45; i++)
for (int i = 0; i < 75; i++)
{
float offsetAngle = MathHelper.TwoPi * i / 45f;
float offsetAngle = MathHelper.TwoPi * i / 75f;
// Parametric equations for an asteroid.
float unitOffsetX = (float)Math.Pow(Math.Cos(offsetAngle), 3D);
@@ -124,9 +124,9 @@ namespace CalamityMod.Projectiles.Ranged
Vector2 puffDustVelocity = new Vector2(unitOffsetX, unitOffsetY) * 5f;
Dust magic = Dust.NewDustPerfect(tipPosition, 267, puffDustVelocity);
magic.scale = 1.2f;
magic.fadeIn = 0.48f;
magic.color = CalamityUtils.MulticolorLerp(Main.rand.NextFloat(), CalamityUtils.ExoPalette);
magic.scale = 1.5f;
magic.fadeIn = 0.5f;
magic.color = CalamityUtils.MulticolorLerp(i / 75f, CalamityUtils.ExoPalette);
magic.noGravity = true;
}
ChargeTimer++;