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

18 lines
316 B
C#

using Godot;
using System;
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);
}
}