newlon/scripts/components/zombies/behaviours/HoboBehaviour.cs
2025-06-26 20:18:19 +05:00

18 lines
539 B
C#

using Godot;
namespace Newlon.Components.Zombies.Behaviours;
public partial class HoboBehaviour : Node
{
[Export] private EatBox _eatBox;
[Export] private AnimationTree _animationTree;
public bool isEating => _eatBox.isEating;
public bool canDestroyed = false;
public void Trashed()
{
canDestroyed = true;
((AnimationNodeStateMachinePlayback)_animationTree.Get("parameters/playback")).Travel("hobo_zombie_can_destroy");
_animationTree.Set("parameters/eat_Tree/blend/blend_amount", 1.0);
_eatBox._damage.SetMult(3.0f);
}
}