Flame licked shell is no longer a flame empowering dash accessory A modified version of the effect is now on a new accessory called Slagsplitter Pauldron Gehenna is gone Ornate Shield, Asguardian Aegis, Void Sash, and God Slayer Dash have all had their visuals significantly tweaked. outside of Void Sash's scythes no longer spawning directly behind the player, there were no functional changes to these dash adjustments
56 lines
1.9 KiB
C#
56 lines
1.9 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Microsoft.Xna.Framework.Graphics;
|
|
using System;
|
|
using static CalamityMod.CalamityUtils;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Particles
|
|
{
|
|
public class Jaws : Particle
|
|
{
|
|
public override string Texture => "CalamityMod/Particles/Jaws";
|
|
public override bool UseAdditiveBlend => true;
|
|
public override bool SetLifetime => true;
|
|
public override bool UseCustomDraw => true;
|
|
|
|
private float OriginalScale;
|
|
private float FinalScale;
|
|
private float opacity;
|
|
private Vector2 Squish;
|
|
private Color BaseColor;
|
|
|
|
public Jaws(Vector2 position, Vector2 velocity, Color color, Vector2 squish, float rotation, float originalScale, float finalScale, int lifeTime)
|
|
{
|
|
Position = position;
|
|
Velocity = velocity;
|
|
BaseColor = color;
|
|
OriginalScale = originalScale;
|
|
FinalScale = finalScale;
|
|
Scale = originalScale;
|
|
Lifetime = lifeTime;
|
|
Squish = squish;
|
|
Rotation = rotation;
|
|
}
|
|
|
|
public override void Update()
|
|
{
|
|
float pulseProgress = PiecewiseAnimation(LifetimeCompletion, new CurveSegment[] { new CurveSegment(EasingType.PolyOut, 0f, 0f, 1f, 4) });
|
|
Scale = MathHelper.Lerp(OriginalScale, FinalScale, pulseProgress);
|
|
|
|
opacity = (float)Math.Sin(MathHelper.PiOver2 + LifetimeCompletion * MathHelper.PiOver2);
|
|
|
|
Color = BaseColor;
|
|
Lighting.AddLight(Position, Color.R / 255f, Color.G / 255f, Color.B / 255f);
|
|
Velocity *= 0.95f;
|
|
}
|
|
|
|
public override void CustomDraw(SpriteBatch spriteBatch)
|
|
{
|
|
Texture2D tex = ModContent.Request<Texture2D>(Texture).Value;
|
|
spriteBatch.Draw(tex, Position - Main.screenPosition, null, Color, Rotation, tex.Size() / 2f, Scale * Squish, SpriteEffects.None, 0);
|
|
}
|
|
|
|
}
|
|
}
|