fix: rendering

pull/255/head
Allison Ryan 3 years ago
parent 07aa81dd30
commit 213792404b

@ -12,9 +12,9 @@ class Launcher extends Blueprint {
Launcher() Launcher()
: super( : super(
components: [ components: [
ControlledPlunger(compressionDistance: 14) ControlledPlunger(compressionDistance: 10.5)
..initialPosition = Vector2(40.7, 38), ..initialPosition = Vector2(41.1, 43),
RocketSpriteComponent()..position = Vector2(43, 62), RocketSpriteComponent()..position = Vector2(43, 62.3),
], ],
blueprints: [LaunchRamp()], blueprints: [LaunchRamp()],
); );

@ -82,7 +82,7 @@ class Plunger extends BodyComponent with InitialPosition, Layered {
/// The velocity's magnitude depends on how far the [Plunger] has been pulled /// The velocity's magnitude depends on how far the [Plunger] has been pulled
/// from its original [initialPosition]. /// from its original [initialPosition].
void release() { void release() {
final velocity = (initialPosition.y - body.position.y) * 5; final velocity = (initialPosition.y - body.position.y) * 7;
body.linearVelocity = Vector2(0, velocity); body.linearVelocity = Vector2(0, velocity);
_spriteComponent.release(); _spriteComponent.release();
} }
@ -221,7 +221,7 @@ class PlungerAnchorPrismaticJointDef extends PrismaticJointDef {
plunger.body, plunger.body,
anchor.body, anchor.body,
plunger.body.position + anchor.body.position, plunger.body.position + anchor.body.position,
Vector2(18.6, BoardDimensions.bounds.height), Vector2(16, BoardDimensions.bounds.height),
); );
enableLimit = true; enableLimit = true;
lowerTranslation = double.negativeInfinity; lowerTranslation = double.negativeInfinity;

@ -55,7 +55,7 @@ abstract class RenderPriority {
static const int plunger = _above + launchRamp; static const int plunger = _above + launchRamp;
static const int rocket = _above + bottomBoundary; static const int rocket = _below + bottomBoundary;
// Dino Land // Dino Land

Loading…
Cancel
Save