newlon/scripts/components/plants/behaviours/SunflowerBehaviour.cs

20 lines
367 B
C#

using Godot;
namespace Newlon.Components.Plants.Behaviours;
public partial class SunflowerBehaviour : Node
{
private AnimationPlayer _player;
public override void _Ready()
{
_player = GetNode<AnimationPlayer>("../AnimationPlayer");
}
public void Timeout()
{
_player.Play("produce");
_player.Queue("idle");
}
}