Fixed sunflower

This commit is contained in:
Фёдор Веселов 2024-09-17 16:53:33 +05:00
commit cca91bbece
2 changed files with 7 additions and 57 deletions

View file

@ -3,16 +3,17 @@ using System;
public partial class SunflowerBehaviour : Node
{
private AnimationTree _tree;
private AnimationPlayer _player;
public override void _Ready()
{
_tree = GetNode<AnimationTree>("../AnimationTree");
_player = GetNode<AnimationPlayer>("../AnimationPlayer");
}
public void Timeout()
{
_tree.Set("parameters/conditions/produce",true);
_player.Play("produce");
_player.Queue("idle");
}
}