using Godot;

namespace Cirno.Scripts.Components.FSM.Enemy;

public partial class EnemyFSMAnimatedSprite : AnimatedSprite2D
{
    public override void _Ready()
    {
        var enemyFsmProxy = this.GetParentOrNull<EnemyFSMProxy>();

        if (enemyFsmProxy?.EnemyResource?.AnimationFrames != null)
        {
            this.SpriteFrames = enemyFsmProxy.EnemyResource.AnimationFrames;
        }
    }
}