Broken sunflower
This commit is contained in:
parent
0c9ea6ed0f
commit
83d36f53b2
6 changed files with 211 additions and 6 deletions
18
scripts/components/plants/behaviours/SunflowerBehaviour.cs
Normal file
18
scripts/components/plants/behaviours/SunflowerBehaviour.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue