Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Commit

Permalink
refactor: move const before final members
Browse files Browse the repository at this point in the history
  • Loading branch information
alestiago committed Feb 16, 2024
1 parent 0737e48 commit dbba3ec
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ enum Direction { up, down, left, right }
/// A behavior that allows the player to move around the game.
final class PlayerMovingBehavior extends Behavior<Player>
with FlameBlocReader<GameBloc, GameState> {
/// The delay between player moves.
static const _moveDelay = Duration(milliseconds: 100);

/// The lerp time for player movement.
static const _playerMoveAnimationSpeed = 15;

/// The position the player is trying to move to.
///
/// When its values are different than the current [Player.position]
Expand All @@ -19,12 +25,6 @@ final class PlayerMovingBehavior extends Behavior<Player>
/// The position the player was at before the current [_targetPosition].
final Vector2 _previousPosition = Vector2.zero();

/// The delay between player moves.
static const _moveDelay = Duration(milliseconds: 100);

/// The lerp time for player movement.
static const _playerMoveAnimationSpeed = 15;

/// A int that contains the time when the next move can be made.
DateTime _nextMoveTime = DateTime.fromMicrosecondsSinceEpoch(0);

Expand Down

0 comments on commit dbba3ec

Please sign in to comment.