using DungeonRPG.Scripts.General;
using Godot;


public partial class PlayerState : Node
{
    protected Player characterNode;
    public override void _Ready()
    {
        characterNode = GetOwner<Player>();
        SetPhysicsProcess(false);
        SetProcessInput(false);
    }
    
    public override void _Notification(int what)
    {
        base._Notification(what);

        if (what == GameConstants.STATE_NOTIFICATION_ENABLE)
        {
            SetPhysicsProcess(true);
            SetProcessInput(true);
            EnterState();
        }
        else if (what == GameConstants.STATE_NOTIFICATION_DISABLE)
        {
            SetPhysicsProcess(false);
            SetProcessInput(false);
        }
        
    }
    
    
    protected virtual void EnterState()
    { }
}