pull/399/head
Tom Arra 3 years ago
parent 167d1f7e89
commit 1c75d323a2

@ -15,7 +15,7 @@ import 'package:pinball_flame/pinball_flame.dart';
/// {@endtemplate} /// {@endtemplate}
class ScoringBehavior extends Component class ScoringBehavior extends Component
with HasGameRef, FlameBlocReader<GameBloc, GameState> { with HasGameRef, FlameBlocReader<GameBloc, GameState> {
/// {@macto scoring_behavior} /// {@macro scoring_behavior}
ScoringBehavior({ ScoringBehavior({
required Points points, required Points points,
required Vector2 position, required Vector2 position,

@ -143,7 +143,7 @@ class PinballGame extends PinballForge2DGame
final rocket = descendants().whereType<RocketSpriteComponent>().first; final rocket = descendants().whereType<RocketSpriteComponent>().first;
final bounds = rocket.topLeftPosition & rocket.size; final bounds = rocket.topLeftPosition & rocket.size;
// NOTE(wolfen): As long as Flame does not have https://github.com/flame-engine/flame/issues/1586 we need to check it at the highest level manually. // NOTE: As long as Flame does not have https://github.com/flame-engine/flame/issues/1586 we need to check it at the highest level manually.
if (bounds.contains(info.eventPosition.game.toOffset())) { if (bounds.contains(info.eventPosition.game.toOffset())) {
descendants().whereType<Plunger>().single.pullFor(2); descendants().whereType<Plunger>().single.pullFor(2);
} else { } else {

@ -68,7 +68,7 @@ class Ball extends BodyComponent with Layered, InitialPosition, ZIndex {
return world.createBody(bodyDef)..createFixtureFromShape(shape, 1); return world.createBody(bodyDef)..createFixtureFromShape(shape, 1);
} }
/// Immediatly and completly [stop]s the ball. /// Immediately and completely [stop]s the ball.
/// ///
/// The [Ball] will no longer be affected by any forces, including it's /// The [Ball] will no longer be affected by any forces, including it's
/// weight and those emitted from collisions. /// weight and those emitted from collisions.

@ -6,7 +6,7 @@ import 'package:pinball_flame/pinball_flame.dart';
/// {@template plunger} /// {@template plunger}
/// [Plunger] serves as a spring, that shoots the ball on the right side of the /// [Plunger] serves as a spring, that shoots the ball on the right side of the
/// playfield. /// play field.
/// ///
/// [Plunger] ignores gravity so the player controls its downward [pull]. /// [Plunger] ignores gravity so the player controls its downward [pull].
/// {@endtemplate} /// {@endtemplate}

@ -4,7 +4,7 @@ import 'package:flame/game.dart';
import 'package:flame_forge2d/flame_forge2d.dart'; import 'package:flame_forge2d/flame_forge2d.dart';
import 'package:flame_forge2d/world_contact_listener.dart'; import 'package:flame_forge2d/world_contact_listener.dart';
// NOTE(wolfen): This should be removed when https://github.com/flame-engine/flame/pull/1597 is solved. // NOTE: This should be removed when https://github.com/flame-engine/flame/pull/1597 is solved.
/// {@template pinball_forge2d_game} /// {@template pinball_forge2d_game}
/// A [Game] that uses the Forge2D physics engine. /// A [Game] that uses the Forge2D physics engine.
/// {@endtemplate} /// {@endtemplate}

@ -2,7 +2,7 @@ import 'dart:async';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
/// {@tempalte animated_ellipsis_text} /// {@template animated_ellipsis_text}
/// Every 500 milliseconds, it will add a new `.` at the end of the given /// Every 500 milliseconds, it will add a new `.` at the end of the given
/// [text]. Once 3 `.` have been added (e.g. `Loading...`), it will reset to /// [text]. Once 3 `.` have been added (e.g. `Loading...`), it will reset to
/// zero ellipsis and start over again. /// zero ellipsis and start over again.

@ -2,7 +2,7 @@ import 'package:flutter/material.dart';
import 'package:pinball_ui/gen/gen.dart'; import 'package:pinball_ui/gen/gen.dart';
import 'package:pinball_ui/pinball_ui.dart'; import 'package:pinball_ui/pinball_ui.dart';
/// Enum with all possibile directions of a [PinballDpadButton]. /// Enum with all possible directions of a [PinballDpadButton].
enum PinballDpadDirection { enum PinballDpadDirection {
/// Up /// Up
up, up,

@ -27,7 +27,7 @@ void main() {
}); });
test( test(
'returns false when defaultTargetPlatform is niether iOS nor android', 'returns false when defaultTargetPlatform is neither iOS nor android',
() async { () async {
debugDefaultTargetPlatformOverride = TargetPlatform.macOS; debugDefaultTargetPlatformOverride = TargetPlatform.macOS;
expect(PlatformHelper().isMobile, isFalse); expect(PlatformHelper().isMobile, isFalse);

Loading…
Cancel
Save