refactor: changed name for spaceshipexit layer

pull/79/head
RuiAlonso 4 years ago
parent a271a49b76
commit 618f698ec0

@ -59,8 +59,8 @@ enum Layer {
/// Collide only with Spaceship group elements.
spaceship,
/// Collide only with Spaceship drop group elements.
spaceshipDrop,
/// Collide only with Spaceship exit rail group elements.
spaceshipExitRail,
}
/// {@template layer_mask_bits}
@ -89,7 +89,7 @@ extension LayerMaskBits on Layer {
return 0x0005;
case Layer.spaceship:
return 0x000A;
case Layer.spaceshipDrop:
case Layer.spaceshipExitRail:
return 0x0004;
}
}

@ -32,7 +32,7 @@ class Spaceship extends Forge2DBlueprint {
SpaceshipBridge()..initialPosition = position,
SpaceshipBridgeTop()..initialPosition = position + Vector2(0, 5.5),
SpaceshipHole(
onExitLayer: Layer.spaceshipDrop,
onExitLayer: Layer.spaceshipExitRail,
onExitElevation: 2,
)..initialPosition = position - Vector2(5, 4),
SpaceshipHole()..initialPosition = position - Vector2(-5, 4),

@ -30,7 +30,7 @@ class SpaceshipExitRail extends Forge2DBlueprint {
Vector2(30, 0),
Vector2(30, 30),
],
)..layer = Layer.spaceshipDrop;
)..layer = Layer.spaceshipExitRail;
final entrance = Pathway.arc(
color: const Color.fromARGB(255, 226, 226, 218),
@ -40,7 +40,7 @@ class SpaceshipExitRail extends Forge2DBlueprint {
width: 5,
rotation: 218 * math.pi / 180,
singleWall: true,
)..layer = Layer.spaceshipDrop;
)..layer = Layer.spaceshipExitRail;
final exit = Pathway.arc(
color: const Color.fromARGB(255, 226, 226, 218),
@ -50,7 +50,7 @@ class SpaceshipExitRail extends Forge2DBlueprint {
width: 5,
rotation: 36 * math.pi / 180,
singleWall: true,
)..layer = Layer.spaceshipDrop;
)..layer = Layer.spaceshipExitRail;
addAll([
pathway..initialPosition = position,
@ -69,10 +69,10 @@ class SpaceshipExitHole extends RampOpening {
/// {@macro spaceship_exit_hole}
SpaceshipExitHole()
: super(
pathwayLayer: Layer.spaceshipDrop,
pathwayLayer: Layer.spaceshipExitRail,
orientation: RampOrientation.down,
) {
layer = Layer.spaceshipDrop;
layer = Layer.spaceshipExitRail;
}
@override

Loading…
Cancel
Save