using Cirno.Scripts.Enums;
using Godot;

namespace Cirno.Scripts.Components;

public partial class SpriteAnimationStartupRotator : AnimatedSprite2D
{
    public override void _Ready()
    {
        var parent = GetParent<IIRotateable>();
        
        var sprite = GetParent().GetNode<AnimatedSprite2D>("AnimatedSprite2D");
        
        sprite.Play(parent.Direction.ToString());
    }
}