r2mods/ilspy_dump/ror2_csproj/EntityStates.ClayBoss/RecoverExit.cs

32 lines
679 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace EntityStates.ClayBoss;
public class RecoverExit : BaseState
{
public static float exitDuration = 1f;
private float stopwatch;
private static int ExitSiphonStateHash = Animator.StringToHash("ExitSiphon");
private static int ExitSiphonParamHash = Animator.StringToHash("ExitSiphon.playbackRate");
public override void OnEnter()
{
base.OnEnter();
stopwatch = 0f;
PlayAnimation("Body", ExitSiphonStateHash, ExitSiphonParamHash, exitDuration);
}
public override void FixedUpdate()
{
base.FixedUpdate();
stopwatch += GetDeltaTime();
if (stopwatch >= exitDuration && base.isAuthority)
{
outer.SetNextStateToMain();
}
}
}