refactor: dinowalls sandbox refactor

pull/208/head
RuiAlonso 3 years ago
parent 2022151305
commit a4196e39ec

@ -5,10 +5,10 @@ import 'package:pinball_components/pinball_components.dart';
import 'package:pinball_flame/pinball_flame.dart'; import 'package:pinball_flame/pinball_flame.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart'; import 'package:sandbox/stories/ball/basic_ball_game.dart';
class DinoWallGame extends BasicBallGame { class DinoWallGame extends BallGame {
DinoWallGame() : super(); DinoWallGame() : super();
static const info = ''' static const description = '''
Shows how DinoWalls are rendered. Shows how DinoWalls are rendered.
- Activate the "trace" parameter to overlay the body. - Activate the "trace" parameter to overlay the body.

@ -1,15 +1,11 @@
import 'package:dashbook/dashbook.dart'; import 'package:dashbook/dashbook.dart';
import 'package:flame/game.dart';
import 'package:sandbox/common/common.dart'; import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/dino_wall/dino_wall_game.dart'; import 'package:sandbox/stories/dino_wall/dino_wall_game.dart';
void addDinoWallStories(Dashbook dashbook) { void addDinoWallStories(Dashbook dashbook) {
dashbook.storiesOf('DinoWall').add( dashbook.storiesOf('DinoWall').addGame(
'Basic', title: 'Traced',
(context) => GameWidget( description: DinoWallGame.description,
game: DinoWallGame()..trace = context.boolProperty('Trace', true), gameBuilder: (_) => DinoWallGame(),
),
codeLink: buildSourceLink('dino_wall/basic.dart'),
info: DinoWallGame.info,
); );
} }

Loading…
Cancel
Save