diff --git a/Particles/GenericSparkle.cs b/Particles/GenericSparkle.cs index a83c687b6d..7e8b44a156 100644 --- a/Particles/GenericSparkle.cs +++ b/Particles/GenericSparkle.cs @@ -10,6 +10,8 @@ namespace CalamityMod.Particles { public class GenericSparkle : Particle { + public override string Texture => "CalamityMod/Particles/Sparkle"; + public GenericSparkle(Vector2 position, Vector2 velocity, Color color, float scale, int lifeTime, float rotationSpeed = 1f) { Position = position; diff --git a/Particles/Particle.cs b/Particles/Particle.cs index 70bfe50976..ee9467d316 100644 --- a/Particles/Particle.cs +++ b/Particles/Particle.cs @@ -27,7 +27,7 @@ namespace CalamityMod.Particles /// public int Lifetime = 0; - public float LifetimeCompletion => Lifetime != 0 ? Time / Lifetime : 0; + public float LifetimeCompletion => Lifetime != 0 ? Time / (float)Lifetime : 0; /// /// The offset of the particle in relation to the origin of the set it belongs to. This is only used in the context of a Particle Set diff --git a/Particles/Sparkle.png b/Particles/Sparkle.png new file mode 100644 index 0000000000..79930b6e99 Binary files /dev/null and b/Particles/Sparkle.png differ diff --git a/Particles/ThanatosSmokeParticle.cs b/Particles/ThanatosSmokeParticle.cs index cd039bb100..27235a3071 100644 --- a/Particles/ThanatosSmokeParticle.cs +++ b/Particles/ThanatosSmokeParticle.cs @@ -40,7 +40,7 @@ namespace CalamityMod.Particles Color = Color.Lerp(Color, new Color(154, 139, 138), (float)Math.Pow(Utils.InverseLerp(0f, 0.57f, LifetimeCompletion, true), 2D) * 0.5f + 0.5f); Color.A = 92; - float opacity = Utils.InverseLerp(1f, 0.85f, Time / Lifetime, true); + float opacity = Utils.InverseLerp(1f, 0.85f, LifetimeCompletion, true); Color *= opacity; }