Changed zombie speed from int to floatmod, added hobo

This commit is contained in:
Rendo 2025-06-22 23:30:37 +05:00
commit ad8ecb875a
9 changed files with 310 additions and 158 deletions

View file

@ -1,19 +0,0 @@
using Godot;
namespace Newlon.Components.Zombies.Behaviours;
public partial class BasicZombieBehaviour : Node
{
[Export] private AnimationTree _animationTree;
public void StartEating()
{
_animationTree.Set("parameters/conditions/eat",true);
_animationTree.Set("parameters/conditions/end_eat", false);
GD.Print("StartEating");
}
public void EndEating()
{
_animationTree.Set("parameters/conditions/eat", false);
_animationTree.Set("parameters/conditions/end_eat", true);
}
}

View file

@ -1 +0,0 @@
uid://cgf61r46dgh4m

View file

@ -0,0 +1,17 @@
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);
}
}

View file

@ -0,0 +1 @@
uid://c5v2og85t7s6j