Animations improved
This commit is contained in:
parent
c89d93cf24
commit
ad18793543
35 changed files with 430 additions and 465 deletions
|
|
@ -4,17 +4,16 @@ namespace Newlon.Components.Plants.Behaviours;
|
|||
|
||||
public partial class SunflowerBehaviour : Node
|
||||
{
|
||||
private AnimationPlayer _player;
|
||||
private AnimationTree _tree;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_player = GetNode<AnimationPlayer>("../AnimationPlayer");
|
||||
_tree = GetNode<AnimationTree>("../AnimationTree");
|
||||
}
|
||||
|
||||
public void Timeout()
|
||||
{
|
||||
_player.Play("produce");
|
||||
_player.Queue("idle");
|
||||
_tree.Set("parameters/conditions/produce",true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue