r2mods/ilspy_dump/ror2_csproj/EntityStates/PrepFlower2.cs

40 lines
880 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using RoR2;
using UnityEngine;
namespace EntityStates;
public class PrepFlower2 : BaseState
{
public static float baseDuration;
public static string enterSoundString;
private float duration;
private static int PrepFlowerStateHash = Animator.StringToHash("PrepFlower");
private static int PrepFlowerParamHash = Animator.StringToHash("PrepFlower.playbackRate");
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration / attackSpeedStat;
Util.PlaySound(enterSoundString, base.gameObject);
PlayAnimation("Gesture, Additive", PrepFlowerStateHash, PrepFlowerParamHash, duration);
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (base.fixedAge >= duration)
{
outer.SetNextState(new FireFlower2());
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
return InterruptPriority.PrioritySkill;
}
}