44 lines
845 B
C#
44 lines
845 B
C#
|
using RoR2;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace EntityStates.VoidRaidCrab;
|
||
|
|
||
|
public class CloseGauntlet : BaseState
|
||
|
{
|
||
|
[SerializeField]
|
||
|
public float duration;
|
||
|
|
||
|
[SerializeField]
|
||
|
public string animationLayerName;
|
||
|
|
||
|
[SerializeField]
|
||
|
public string animationStateName;
|
||
|
|
||
|
[SerializeField]
|
||
|
public string animationPlaybackRateParam;
|
||
|
|
||
|
[SerializeField]
|
||
|
public string enterSoundString;
|
||
|
|
||
|
public override void OnEnter()
|
||
|
{
|
||
|
base.OnEnter();
|
||
|
PlayAnimation(animationLayerName, animationStateName, animationPlaybackRateParam, duration);
|
||
|
Util.PlaySound(enterSoundString, base.gameObject);
|
||
|
}
|
||
|
|
||
|
public override void FixedUpdate()
|
||
|
{
|
||
|
base.FixedUpdate();
|
||
|
if (base.isAuthority && base.fixedAge >= duration)
|
||
|
{
|
||
|
outer.SetNextStateToMain();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public override InterruptPriority GetMinimumInterruptPriority()
|
||
|
{
|
||
|
return InterruptPriority.Death;
|
||
|
}
|
||
|
}
|