refactor(sandbox): made BasicBallGame color optional (#171)

pull/183/head
Alejandro Santiago 3 years ago committed by GitHub
parent baf06ca737
commit 9a5284f84b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -7,7 +7,7 @@ class BallBoosterGame extends LineGame {
static const info = '''
Shows how a Ball with a boost works.
Drag to launch a boosted Ball.
- Drag to launch a boosted Ball.
''';
@override

@ -5,7 +5,7 @@ import 'package:sandbox/common/common.dart';
class BasicBallGame extends BasicGame with TapDetector, Traceable {
BasicBallGame({
required this.color,
this.color = Colors.blue,
this.ballPriority = 0,
this.ballLayer = Layer.all,
});

@ -4,8 +4,6 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class BoundariesGame extends BasicBallGame with Traceable {
BoundariesGame() : super(color: const Color(0xFFFF0000));
static const info = '''
Shows how Boundaries are rendered.

@ -6,7 +6,7 @@ class FireEffectGame extends LineGame {
static const info = '''
Shows how the FireEffect renders.
Drag a line to define the trail direction.
- Drag a line to define the trail direction.
''';
@override

@ -7,8 +7,6 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class FlipperGame extends BasicBallGame with KeyboardEvents, Traceable {
FlipperGame() : super(color: Colors.blue);
static const info = '''
Shows how Flippers are rendered.

@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:ui';
import 'package:flame_forge2d/flame_forge2d.dart';
import 'package:pinball_components/pinball_components.dart';
@ -7,8 +6,6 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class BigDashNestBumperGame extends BasicBallGame with Traceable {
BigDashNestBumperGame() : super(color: const Color(0xFF0000FF));
static const info = '''
Shows how a BigDashNestBumper is rendered.

@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:ui';
import 'package:flame_forge2d/flame_forge2d.dart';
import 'package:pinball_components/pinball_components.dart';
@ -7,8 +6,6 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class FlutterSignPostGame extends BasicBallGame with Traceable {
FlutterSignPostGame() : super(color: const Color(0xFF0000FF));
static const info = '''
Shows how a FlutterSignPost is rendered.

@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:ui';
import 'package:flame_forge2d/flame_forge2d.dart';
import 'package:pinball_components/pinball_components.dart';
@ -7,8 +6,6 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class SmallDashNestBumperAGame extends BasicBallGame with Traceable {
SmallDashNestBumperAGame() : super(color: const Color(0xFF0000FF));
static const info = '''
Shows how a SmallDashNestBumper ("a") is rendered.

@ -1,5 +1,4 @@
import 'dart:async';
import 'dart:ui';
import 'package:flame_forge2d/flame_forge2d.dart';
import 'package:pinball_components/pinball_components.dart';
@ -7,8 +6,6 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class SmallDashNestBumperBGame extends BasicBallGame with Traceable {
SmallDashNestBumperBGame() : super(color: const Color(0xFF0000FF));
static const info = '''
Shows how a SmallDashNestBumper ("b") is rendered.

@ -4,8 +4,6 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class KickerGame extends BasicBallGame with Traceable {
KickerGame() : super(color: const Color(0xFFFF0000));
static const info = '''
Shows how Kickers are rendered.

@ -10,7 +10,7 @@ class BasicLayerGame extends BasicGame with TapDetector {
static const info = '''
Shows how Layers work when a Ball hits other components.
Tap anywhere on the screen to spawn a Ball into the game.
- Tap anywhere on the screen to spawn a Ball into the game.
''';
final Color color;

@ -4,8 +4,6 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class SlingshotGame extends BasicBallGame with Traceable {
SlingshotGame() : super(color: const Color(0xFFFF0000));
static const info = '''
Shows how Slingshots are rendered.

@ -9,7 +9,7 @@ class BasicSpaceshipGame extends BasicGame with TapDetector {
static const info = '''
Shows how a Spaceship works.
Tap anywhere on the screen to spawn a Ball into the game.
- Tap anywhere on the screen to spawn a Ball into the game.
''';
@override

@ -6,12 +6,10 @@ import 'package:sandbox/common/common.dart';
import 'package:sandbox/stories/ball/basic_ball_game.dart';
class SparkyBumperGame extends BasicBallGame with Traceable {
SparkyBumperGame() : super(color: const Color(0xFF0000FF));
static const info = '''
Shows how a SparkyBumper is rendered.
Activate the "trace" parameter to overlay the body.
- Activate the "trace" parameter to overlay the body.
''';
@override

@ -5,8 +5,9 @@ import 'package:sandbox/common/common.dart';
class BasicCameraZoomGame extends BasicGame with TapDetector {
static const info = '''
Simple game to demonstrate how the CameraZoom can be used.
Tap to zoom in/out
Shows how CameraZoom can be used.
- Tap to zoom in/out.
''';
bool zoomApplied = false;

Loading…
Cancel
Save