r2mods/ilspy_dump/ror2_csproj/EntityStates.AurelioniteHeart/AurelioniteHeartInertState.cs

36 lines
782 B
C#
Raw Normal View History

2024-10-04 07:26:37 +00:00
using UnityEngine;
namespace EntityStates.AurelioniteHeart;
public class AurelioniteHeartInertState : AurelioniteHeartEntityState
{
[SerializeField]
private float animationDuration = 1f;
[SerializeField]
private string heartInertAnimationState;
public override void OnEnter()
{
base.OnEnter();
}
public override void FixedUpdate()
{
base.FixedUpdate();
heartMovementTimer -= GetDeltaTime();
if (heartMovementTimer <= 0f)
{
heartMovementTimer += 0.02f;
if (base.gameObject.transform.position != inertPosition)
{
base.gameObject.transform.position += new Vector3(0f, -0.25f, 0f);
return;
}
animator.StopPlayback();
heartController.rebirthShrine.SetActive(value: true);
outer.SetNextState(new AurelioniteHeartIdleState());
}
}
}