Files
CalamityModPublic/Projectiles/Magic/MelterNote2.cs
T
DominicKarma42 55e89c9b98 Replaced (hopefully) every magic number with a constant
Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
2020-05-30 17:56:36 -04:00

54 lines
1.5 KiB
C#

using Microsoft.Xna.Framework;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{
public class MelterNote2 : ModProjectile
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Song");
}
public override void SetDefaults()
{
projectile.width = 16;
projectile.height = 24;
projectile.friendly = true;
projectile.magic = true;
projectile.penetrate = 10;
projectile.timeLeft = 600;
projectile.usesLocalNPCImmunity = true;
projectile.localNPCHitCooldown = 7;
projectile.tileCollide = false;
projectile.ignoreWater = true;
}
public override void AI()
{
projectile.velocity.X *= 0.99f;
projectile.velocity.Y *= 0.99f;
if (projectile.localAI[0] == 0f)
{
projectile.scale += 0.02f;
if (projectile.scale >= 1.25f)
{
projectile.localAI[0] = 1f;
}
}
else if (projectile.localAI[0] == 1f)
{
projectile.scale -= 0.02f;
if (projectile.scale <= 0.75f)
{
projectile.localAI[0] = 0f;
}
}
}
public override Color? GetAlpha(Color lightColor)
{
return new Color(255, 255, 255);
}
}
}