mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 11:15:33 +00:00
23 lines
533 B
C#
23 lines
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);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|