From e0cb2bb005c2207b2dbc235738d4ec455058adb7 Mon Sep 17 00:00:00 2001 From: Erick Zanardo Date: Fri, 18 Mar 2022 10:38:32 -0300 Subject: [PATCH] fix: typo --- .../spaceship/{sauce.png => saucer.png} | Bin lib/game/components/spaceship.dart | 16 ++++++++-------- lib/game/game_assets.dart | 2 +- lib/game/pinball_game.dart | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) rename assets/images/components/spaceship/{sauce.png => saucer.png} (100%) diff --git a/assets/images/components/spaceship/sauce.png b/assets/images/components/spaceship/saucer.png similarity index 100% rename from assets/images/components/spaceship/sauce.png rename to assets/images/components/spaceship/saucer.png diff --git a/lib/game/components/spaceship.dart b/lib/game/components/spaceship.dart index 356fa6b3..b6fb7244 100644 --- a/lib/game/components/spaceship.dart +++ b/lib/game/components/spaceship.dart @@ -12,15 +12,15 @@ import 'package:pinball/game/game.dart'; const _spaceShipBits = 0x0002; const _spaceShipSize = 20.0; -/// {@template spaceship_sauce} -/// A [BodyComponent] for the base, or the sauce of the spaceship +/// {@template spaceship_saucer} +/// A [BodyComponent] for the base, or the saucer of the spaceship /// {@endtemplate} -class SpaceshipSauce extends BodyComponent with InitialPosition { - /// {@macro spaceship_sauce} - SpaceshipSauce() : super(priority: 2); +class SpaceshipSaucer extends BodyComponent with InitialPosition { + /// {@macro spaceship_saucer} + SpaceshipSaucer() : super(priority: 2); /// Path for the base sprite - static const sauceSpritePath = 'components/spaceship/sauce.png'; + static const saucerSpritePath = 'components/spaceship/saucer.png'; /// Path for the upper wall sprite static const upperWallPath = 'components/spaceship/upper.png'; @@ -29,7 +29,7 @@ class SpaceshipSauce extends BodyComponent with InitialPosition { Future onLoad() async { await super.onLoad(); final sprites = await Future.wait([ - gameRef.loadSprite(sauceSpritePath), + gameRef.loadSprite(saucerSpritePath), gameRef.loadSprite(upperWallPath), ]); @@ -227,7 +227,7 @@ class SpaceshipHole extends BodyComponent with InitialPosition { /// {@template spaceship_wall} /// A [BodyComponent] that provides the collision for the wall /// surrounding the spaceship, with a small opening to allow the -/// [Ball] to get inside the spaceship sauce. +/// [Ball] to get inside the spaceship saucer. /// It also contains the [SpriteComponent] for the lower wall /// {@endtemplate} class SpaceshipWall extends BodyComponent with InitialPosition { diff --git a/lib/game/game_assets.dart b/lib/game/game_assets.dart index 9e300cfc..00e9d09c 100644 --- a/lib/game/game_assets.dart +++ b/lib/game/game_assets.dart @@ -10,7 +10,7 @@ extension PinballGameAssetsX on PinballGame { images.load(SpaceshipBridge.spritePath), images.load(SpaceshipBridgeTop.spritePath), images.load(SpaceshipWall.lowerWallPath), - images.load(SpaceshipSauce.upperWallPath), + images.load(SpaceshipSaucer.upperWallPath), ]); } } diff --git a/lib/game/pinball_game.dart b/lib/game/pinball_game.dart index d54f3e76..d31ba3e8 100644 --- a/lib/game/pinball_game.dart +++ b/lib/game/pinball_game.dart @@ -81,7 +81,7 @@ class PinballGame extends Forge2DGame Future _addSpaceship() async { final position = Vector2(20, -24); - unawaited(add(SpaceshipSauce()..initialPosition = position)); + unawaited(add(SpaceshipSaucer()..initialPosition = position)); unawaited(add(SpaceshipEntrance()..initialPosition = position)); unawaited(add(SpaceshipBridge()..initialPosition = position)); unawaited(