cirnogodot/Scripts/Components/FSM/Enemy/EnemyFSMAnimatedSprite.cs

16 lines
408 B
C#
Raw Normal View History

2025-06-03 10:11:09 +02:00
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;
}
}
}