Skip to content

Commit

Permalink
docs: Fix step 2 of space shooter tutorial delta values (#3200)
Browse files Browse the repository at this point in the history
There was a small code Error in Step 2 of the Space Shooter Tutorial
```
the onPanUpdate method looked like this 
  void onPanUpdate(DragUpdateInfo info) {
    player.move(info.delta.global);
  }
```
but it should look like this
```
  void onPanUpdate(DragUpdateInfo info) {
    player.move(info.delta.global);
  }
```
  • Loading branch information
FlorianGrollich committed Jun 19, 2024
1 parent b0ff5c4 commit 75efb0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/tutorials/space_shooter/step_2.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class SpaceShooterGame extends FlameGame with PanDetector {
@override
void onPanUpdate(DragUpdateInfo info) {
player.move(info.delta.game);
player.move(info.delta.global);
}
}
```
Expand Down Expand Up @@ -116,7 +116,7 @@ class SpaceShooterGame extends FlameGame with PanDetector {
@override
void onPanUpdate(DragUpdateInfo info) {
player.move(info.delta.game);
player.move(info.delta.global);
}
}
```
Expand Down Expand Up @@ -181,7 +181,7 @@ class SpaceShooterGame extends FlameGame with PanDetector {
@override
void onPanUpdate(DragUpdateInfo info) {
player.move(info.delta.game);
player.move(info.delta.global);
}
}
```
Expand Down

0 comments on commit 75efb0c

Please sign in to comment.