remove player usePositionToRender
MODIFY
lib/player/player.dart
lib/player/player.dart
@@ -27,8 +27,6 @@ class Player extends AnimatedObject
bool _isDead = false;
- bool _nextFrameUsePosition = false;
-
final Size sizeCentralMovementWindow;
Rect rectCentralMovementWindow;
@@ -64,9 +62,7 @@ class Player extends AnimatedObject
@override
void update(double dt) {
super.update(dt);
- if (_nextFrameUsePosition) {
- _nextFrameUsePosition = false;
- }
+
_dtUpdate = dt;
}
@@ -221,10 +217,6 @@ class Player extends AnimatedObject
}
}
- void usePositionToRender() {
- _nextFrameUsePosition = true;
- }
-
Rect get rectCollision => getRectCollision(position);
@override

MODIFY
lib/util/camera.dart
lib/util/camera.dart
@@ -150,7 +150,6 @@ class Camera with HasGameRef<RPGGame> {
moveToPositionAnimated(
Position(_positionPlayer.left, _positionPlayer.top),
finish: () {
- gameRef.player.usePositionToRender();
if (finish != null) finish();
},
duration: duration,
@@ -161,7 +160,6 @@ class Camera with HasGameRef<RPGGame> {
if (gameRef.player == null) return;
Rect _positionPlayer = gameRef.player.position;
moveToPosition(Position(_positionPlayer.left, _positionPlayer.top));
- gameRef.player.usePositionToRender();
}
bool isComponentOnCamera(GameComponent c) {

remove player usePositionToRender