Update lib/game/components/crossing_ramp.dart

Co-authored-by: Allison Ryan <77211884+allisonryan0002@users.noreply.github.com>
pull/40/head
Rui Miguel Alonso 4 years ago committed by GitHub
parent ac17e5151c
commit 5988638c67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -77,17 +77,16 @@ abstract class RampArea extends BodyComponent {
@override
Body createBody() {
final fixtureDef = FixtureDef(shape)..isSensor = true;
final fixtureDef = FixtureDef(shape)
..isSensor = true
..filter.categoryBits = _categoryBits;
final bodyDef = BodyDef()
..userData = this
..position = _position
..type = BodyType.static;
final body = world.createBody(bodyDef);
body.createFixture(fixtureDef).filterData.categoryBits = _categoryBits;
return body;
return world.createBody(bodyDef)..createFixture(fixtureDef);
}
}

Loading…
Cancel
Save