using Godot;

namespace Cirno.Scripts.Components.FSM;

public abstract partial class PlayerNode2DModule : Node2D, IModule<PlayerState, CharacterBody2D>
{
    public IStateMachine<PlayerState, CharacterBody2D> StateMachine { get; private set; }

    public CharacterBody2D CharacterBody => StateMachine.MainObject;


    public abstract void EnterState(PlayerState state);
    public abstract void ExitState(PlayerState state);

    public virtual void Init(IStateMachine<PlayerState, CharacterBody2D> machine)
    {
        StateMachine = machine;
    }
    public abstract void Process(double delta);
    public abstract void PhysicsProcess(double delta);
}