mirror of
https://github.com/flame-engine/flame.git
synced 2025-10-29 07:56:53 +08:00
Simple example to test the `onGameResize` lifecycle method. https://github.com/user-attachments/assets/e0a874e9-f1f8-4fc3-b9bd-11a726a22794
43 lines
1.5 KiB
Dart
43 lines
1.5 KiB
Dart
import 'package:dashbook/dashbook.dart';
|
|
import 'package:examples/commons/commons.dart';
|
|
import 'package:examples/stories/system/overlays_example.dart';
|
|
import 'package:examples/stories/system/pause_resume_example.dart';
|
|
import 'package:examples/stories/system/resize_example.dart';
|
|
import 'package:examples/stories/system/step_engine_example.dart';
|
|
import 'package:examples/stories/system/without_flame_game_example.dart';
|
|
import 'package:flame/game.dart';
|
|
|
|
void addSystemStories(Dashbook dashbook) {
|
|
dashbook.storiesOf('System')
|
|
..add(
|
|
'Pause/resume engine',
|
|
(_) => GameWidget(game: PauseResumeExample()),
|
|
codeLink: baseLink('system/pause_resume_example.dart'),
|
|
info: PauseResumeExample.description,
|
|
)
|
|
..add(
|
|
'Overlay',
|
|
overlayBuilder,
|
|
codeLink: baseLink('system/overlays_example.dart'),
|
|
info: OverlaysExample.description,
|
|
)
|
|
..add(
|
|
'Without FlameGame',
|
|
(_) => GameWidget(game: NoFlameGameExample()),
|
|
codeLink: baseLink('system/without_flame_game_example.dart'),
|
|
info: NoFlameGameExample.description,
|
|
)
|
|
..add(
|
|
'Step Game',
|
|
(_) => GameWidget(game: StepEngineExample()),
|
|
codeLink: baseLink('system/step_engine_game.dart'),
|
|
info: StepEngineExample.description,
|
|
)
|
|
..add(
|
|
'On Game Resize',
|
|
(_) => GameWidget(game: ResizeExampleGame()),
|
|
codeLink: baseLink('system/resize_example.dart'),
|
|
info: ResizeExampleGame.description,
|
|
);
|
|
}
|