We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1b592a7 + b01238d commit 1bd23f2Copy full SHA for 1bd23f2
Modules/Player/Scripts/Player.cs
@@ -5,7 +5,7 @@ namespace DungeonRoyale.Modules.Player.Scripts;
5
public partial class Player : CharacterBody2D
6
{
7
[Export] private float MovementSpeed { get; set; } = 200.0f;
8
- private AnimatedSprite2D _animatedSprite;
+ private AnimatedSprite2D _animatedSprite = null!;
9
private Direction _currentDirection = Direction.South;
10
11
private const float DIRECTION_THRESHOLD = 0.1f;
@@ -114,7 +114,7 @@ private void PlayIdleAnimation()
114
if (_animatedSprite.Animation == idleAnimation)
115
return;
116
117
- PlayAnimation(idleAnimation);
+ PlayAnimation(idleAnimation, (_currentDirection == Direction.East));
118
_animatedSprite.SpeedScale = 1.0f;
119
}
120
0 commit comments