Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Modules/Player/Scripts/Player.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
public partial class Player : CharacterBody2D
{
[Export] private float MovementSpeed { get; set; } = 200.0f;
private AnimatedSprite2D _animatedSprite;

Check warning on line 6 in Modules/Player/Scripts/Player.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field '_animatedSprite' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 6 in Modules/Player/Scripts/Player.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field '_animatedSprite' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
private Direction _currentDirection = Direction.South;

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

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

Expand Down
Loading