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

19 lines
350 B
C#

using Godot;
namespace Newlon.Components.Plants.Behaviours;
public partial class SunflowerBehaviour : Node
{
private AnimationTree _tree;
public override void _Ready()
{
_tree = GetNode<AnimationTree>("../AnimationTree");
}
public void Timeout()
{
_tree.Set("parameters/conditions/produce",true);
}
}