Plants animation now supports timescale

This commit is contained in:
Rendo 2025-07-07 23:14:32 +05:00
commit e7a9860a54
18 changed files with 141 additions and 60 deletions

View file

@ -17,7 +17,7 @@ public partial class AloeBehaviour : BaseBehaviour
public override void _Process(double delta)
{
_tree.Set("parameters/conditions/charged",_charge);
_tree.Set("parameters/Tree/conditions/charged",_charge);
var checkPos = GetParent<Node2D>().GlobalPosition + Vector2.Right * Utility.TileWidth;
if(_charge && PoolContainer.Instance.TryGetEntity(checkPos, out RuntimePlantData plantData))
@ -25,7 +25,7 @@ public partial class AloeBehaviour : BaseBehaviour
if((float)plantData.HP / (float)plantData.MaxHP < _hpTreshold)
{
_charge = false;
_tree.Set("parameters/conditions/heal",true);
_tree.Set("parameters/Tree/conditions/heal",true);
_timer.Start();
}
}