flame-engine / flame

A Flutter based game engine.
https://flame-engine.org
MIT License
8.98k stars 879 forks source link

Docs: Small Code Error on Step 2 in Space Shooter Example #3199

Closed FlorianGrollich closed 2 weeks ago

FlorianGrollich commented 2 weeks ago

What could be improved

In the Second Step in the Space Shooter Example, there is a small Error in the code:

The onPanUpdate method is shown like this:

 @override
  void onPanUpdate(DragUpdateInfo info) {
    player.move(info.delta.game);
  }

but it should be like this:

 @override
  void onPanUpdate(DragUpdateInfo info) {
    player.move(info.delta.global);
  }

it is correctly shown when you press the Code button at the end to see the whole code it is also correctly shown in the next steps

Why should this be improved

Because its wrong code :)

Risks

No response

More information

No response

Other