37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using Microsoft.Xna.Framework;
|
|
using Terraria;
|
|
using Terraria.ModLoader;
|
|
|
|
namespace CalamityMod.Projectiles.Rogue
|
|
{
|
|
public class CrystalPiercerShard : ModProjectile, ILocalizedModType
|
|
{
|
|
public new string LocalizationCategory => "Projectiles.Rogue";
|
|
private bool initialized = false;
|
|
|
|
public override void SetDefaults()
|
|
{
|
|
Projectile.width = 6;
|
|
Projectile.height = 6;
|
|
Projectile.friendly = true;
|
|
Projectile.penetrate = 1;
|
|
Projectile.timeLeft = 120;
|
|
Projectile.DamageType = RogueDamageClass.Instance;
|
|
}
|
|
|
|
public override void AI()
|
|
{
|
|
Projectile.rotation += Projectile.direction * 0.05f;
|
|
|
|
if (!initialized)
|
|
{
|
|
Projectile.scale = Main.rand.NextFloat(0.85f, 1.15f);
|
|
initialized = true;
|
|
}
|
|
}
|
|
|
|
//glowmask effect
|
|
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200);
|
|
}
|
|
}
|