mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:05:34 +00:00
30 lines
No EOL
844 B
C#
30 lines
No EOL
844 B
C#
using Cirno.Scripts.Components.Actors._3D;
|
|
using Cirno.Scripts.Resources;
|
|
using Godot;
|
|
|
|
namespace Cirno.Scripts.Components.FSM.Enemy._3D;
|
|
|
|
[Tool]
|
|
public partial class EnemyFSMAnimatedSprite3D : AnimatedShaderSprite3D
|
|
{
|
|
//[Export] public EnemyProxy3D EnemyProxy { get; private set; }
|
|
|
|
public override void _Ready()
|
|
{
|
|
base._Ready();
|
|
//EnemyProxy.Initialized += EnemyFsmProxyOnInitialized;
|
|
if (!Engine.IsEditorHint())
|
|
{
|
|
var enemyProxy = GetParent<EnemyProxy3D>();
|
|
this.SpriteFrames = enemyProxy.EnemyResource.AnimationFrames;
|
|
|
|
HandleFrameChanged();
|
|
}
|
|
}
|
|
|
|
private void EnemyFsmProxyOnInitialized(EnemyResource resource)
|
|
{
|
|
if (Engine.IsEditorHint()) return;
|
|
this.SpriteFrames = resource.AnimationFrames;
|
|
}
|
|
} |