Skip to content

Commit

Permalink
Merge pull request #7 from LeonardoCruzx/fix/east-animation-idle
Browse files Browse the repository at this point in the history
fix: corrige animacao idle leste
  • Loading branch information
patrickreisx authored Jan 25, 2025
2 parents 1b592a7 + b01238d commit 1bd23f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/Player/Scripts/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace DungeonRoyale.Modules.Player.Scripts;
public partial class Player : CharacterBody2D
{
[Export] private float MovementSpeed { get; set; } = 200.0f;
private AnimatedSprite2D _animatedSprite;
private AnimatedSprite2D _animatedSprite = null!;
private Direction _currentDirection = Direction.South;

private const float DIRECTION_THRESHOLD = 0.1f;
Expand Down Expand Up @@ -114,7 +114,7 @@ private void PlayIdleAnimation()
if (_animatedSprite.Animation == idleAnimation)
return;

PlayAnimation(idleAnimation);
PlayAnimation(idleAnimation, (_currentDirection == Direction.East));
_animatedSprite.SpeedScale = 1.0f;
}

Expand Down

0 comments on commit 1bd23f2

Please sign in to comment.