r2mods/ilspy_dump/ror2_csproj/EntityStates.GoldGat/GoldGatIdle.cs

31 lines
589 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2;
namespace EntityStates.GoldGat;
public class GoldGatIdle : BaseGoldGatState
{
public static string windDownSoundString;
public override void OnEnter()
{
base.OnEnter();
Util.PlaySound(windDownSoundString, base.gameObject);
}
public override void Update()
{
base.Update();
if ((bool)gunAnimator)
{
gunAnimator.SetFloat("Crank.playbackRate", 0f, 1f, GetDeltaTime());
}
if (base.isAuthority && shouldFire && bodyMaster.money != 0 && bodyEquipmentSlot.stock > 0)
{
outer.SetNextState(new GoldGatFire
{
shouldFire = shouldFire
});
}
}
}