r2mods/ilspy_dump/ror2_csproj/EntityStates.MegaConstruct/ExitShield.cs

37 lines
690 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace EntityStates.MegaConstruct;
public class ExitShield : BaseState
{
[SerializeField]
public string animationLayerName;
[SerializeField]
public string animationStateName;
[SerializeField]
public string animationPlaybackParameterName;
[SerializeField]
public float baseDuration;
private float duration;
public override void OnEnter()
{
base.OnEnter();
duration = baseDuration / attackSpeedStat;
PlayAnimation(animationLayerName, animationStateName, animationPlaybackParameterName, baseDuration);
}
public override void FixedUpdate()
{
base.FixedUpdate();
if (base.fixedAge > baseDuration)
{
outer.SetNextStateToMain();
}
}
}