Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Marco 2025-03-26 10:17:21 +01:00
commit 9e8c2220b2
24 changed files with 97 additions and 42 deletions

View file

@ -56,13 +56,21 @@ public partial class PlayerAnimationProvider : Node2D
public void SetAnimation(Vector2 velocity)
{
if (velocity.X == 0 && velocity.Y == 0)
if (velocity.Length() == 0)
{
_animatedSprite.SpeedScale = 0;
}
else
{
_animatedSprite.SpeedScale = 1;
if (velocity.Length() > 40)
{
_animatedSprite.SpeedScale = 1;
}
else
{
_animatedSprite.SpeedScale = 0.8f;
}
}
if (velocity.X > 0)