using Intrepid.Structures;
using Intrepid.Utilities;
using UnityEngine;

namespace Intrepid.Gameplay.Entities.Player.Sentinel.StateMachine.States
{
    public class SentinelStateFallToAbyss : SentinelState
    {
        [GroupConfigurations, SerializeField] private AnimationClip fallToAbyss;
        
        public override SentinelStateType GetStateKey()
        {
            return SentinelStateType.FallToAbyss;
        }

        protected override void Subscriptions()
        {
        }
        
        protected override void RunOnEnter(ParameterStore ps)
        {
            Brain.Controls.ResetDash();
            Brain.Entity.ModelAnimation.CrossFade(fallToAbyss, .1f);
            Brain.Entity.DesiredVelocity = Vector2.zero;
        }

        protected override void RunOnExit()
        {
        }

        public override void RunOnUpdate()
        {
        }
    }
}