add beam wand (thanks lexy)
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using Terraria.ModLoader;
|
||||
using Terraria;
|
||||
|
||||
namespace ForgottenWawiTech.Content.Players
|
||||
{
|
||||
// Tracks per-tick emission cooldown for BeamAttackWand while swinging.
|
||||
public class BeamAttackWandPlayer : ModPlayer
|
||||
{
|
||||
public int BeamEmissionTimer = 0;
|
||||
public float LastBeamRot; // smoothed rotation used to cluster beams
|
||||
|
||||
public override void ResetEffects()
|
||||
{
|
||||
// If not holding the wand, allow immediate beam spawn next time it's used and reset rotation smoothing.
|
||||
if (Player.HeldItem.type != ModContent.ItemType<Items.Weapons.Magic.BeamAttackWand>())
|
||||
{
|
||||
BeamEmissionTimer = 0;
|
||||
LastBeamRot = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user