cirnogodot/Scripts/Actors/3D/Turret3DAnimator.cs
2025-10-09 09:11:25 +02:00

23 lines
No EOL
533 B
C#

using Godot;
namespace Cirno.Scripts.Actors._3D;
public partial class Turret3DAnimator : Node
{
[Export] public AnimationPlayer Animator { get; private set; }
[Export] public StringName OnAnimationName { get; private set; }
[Export] public StringName OffAnimationName { get; private set; }
public void ChangeState(bool state)
{
if (state)
{
Animator?.Play(OnAnimationName);
}
else
{
Animator?.Play(OffAnimationName);
}
}
}