forked from flame-engine/flame
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add WorldRoute to enable swapping worlds from the RouterCompone…
…nt (flame-engine#3372) This PR adds the `WorldRoute` which acts as a normal route, but instead of adding a new component (page), it swaps out the world that the camera (either the default camera or an explicitly passed in one) is watching.
- Loading branch information
Showing
14 changed files
with
781 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ desktop/ | |
coverage/ | ||
pubspec.lock | ||
pubspec_overrides.yaml | ||
.fvmrc | ||
|
||
# Sphinx related | ||
__pycache__/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import 'package:dashbook/dashbook.dart'; | ||
import 'package:examples/commons/commons.dart'; | ||
import 'package:examples/stories/router/router_world_example.dart'; | ||
import 'package:flame/game.dart'; | ||
|
||
void addRouterStories(Dashbook dashbook) { | ||
dashbook.storiesOf('Router').add( | ||
'Router with multiple worlds', | ||
(_) => GameWidget(game: RouterWorldExample()), | ||
codeLink: baseLink('router/router_world_example.dart'), | ||
info: RouterWorldExample.description, | ||
); | ||
} |
Oops, something went wrong.