Note: Does not include item rarities, and appears to shown nonexistant using directive movement in the commit. This does not really affect anything, however.
32 lines
797 B
C#
32 lines
797 B
C#
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Dusts
|
|
{
|
|
public class HBSparkle : ModDust
|
|
{
|
|
public override void OnSpawn(Dust dust)
|
|
{
|
|
dust.velocity *= 0.1f;
|
|
dust.alpha = 155;
|
|
dust.noGravity = true;
|
|
dust.noLight = true;
|
|
dust.scale *= 0.25f;
|
|
}
|
|
|
|
public override bool Update(Dust dust)
|
|
{
|
|
dust.position += dust.velocity;
|
|
dust.rotation += dust.velocity.X * 0.05f;
|
|
dust.scale *= 0.99f;
|
|
float light = 0.35f * dust.scale;
|
|
Lighting.AddLight(dust.position, 0.35f, 0.01f, 0.01f);
|
|
if (dust.scale < 0.15f)
|
|
{
|
|
dust.active = false;
|
|
}
|
|
return false;
|
|
}
|
|
}
|
|
}
|