chore: add Component suffix

pull/196/head
Allison Ryan 3 years ago
parent 5453492f55
commit 2f4f7897d0

@ -85,10 +85,10 @@ class Ball<T extends Forge2DGame> extends BodyComponent<T>
body.gravityScale = Vector2(0, 1); body.gravityScale = Vector2(0, 1);
} }
/// Applies a boost and [_TurboChargeSpriteAnimation] on this [Ball]. /// Applies a boost and [_TurboChargeSpriteAnimationComponent] on this [Ball].
Future<void> boost(Vector2 impulse) async { Future<void> boost(Vector2 impulse) async {
body.linearVelocity = impulse; body.linearVelocity = impulse;
await add(_TurboChargeSpriteAnimation()); await add(_TurboChargeSpriteAnimationComponent());
} }
@override @override
@ -147,9 +147,9 @@ class _BallSpriteComponent extends SpriteComponent with HasGameRef {
} }
} }
class _TurboChargeSpriteAnimation extends SpriteAnimationComponent class _TurboChargeSpriteAnimationComponent extends SpriteAnimationComponent
with HasGameRef { with HasGameRef {
_TurboChargeSpriteAnimation() _TurboChargeSpriteAnimationComponent()
: super( : super(
anchor: const Anchor(0.53, 0.72), anchor: const Anchor(0.53, 0.72),
priority: Ball.boardPriority + 1, priority: Ball.boardPriority + 1,

Loading…
Cancel
Save