r2mods/ilspy_dump/ror2_csproj/EntityStates.UrchinTurret.W.../MinigunSpinDown.cs

29 lines
526 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2;
namespace EntityStates.UrchinTurret.Weapon;
public class MinigunSpinDown : MinigunState
{
public static float baseDuration;
public static string sound;
private float duration;
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration / attackSpeedStat;
Util.PlayAttackSpeedSound(sound, base.gameObject, attackSpeedStat);
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (base.fixedAge >= duration && base.isAuthority)
{
outer.SetNextStateToMain();
}
}
}