diff --git a/src/Actors/Blobby/Blobby.gd b/src/Actors/Blobby/Blobby.gd index fd1ffd3..269ba2a 100644 --- a/src/Actors/Blobby/Blobby.gd +++ b/src/Actors/Blobby/Blobby.gd @@ -427,8 +427,8 @@ func _on_BlobbySkin_area_entered(area: Area2D) -> void: if area.is_in_group("harmful") && !levelState.is_dead: die() if area.is_in_group("pit"): - shielded = false - die() + $PitfallTimer.start() + # When the Enemy collision BODY enters the enemy collision area -> die func _on_BlobbySkin_body_entered(body: Node) -> void: @@ -464,6 +464,11 @@ func _on_InvincibilityTimer_timeout() -> void: if area.is_in_group("harmful"): die() +func _on_PitfallTimer_timeout() -> void: + shielded = false + levelState.player_dying() + respawn() + func handle_grounded_movement(delta: float, direction: Vector2) -> Vector2: return calculate_grounded_velocity(velocity, delta, direction) @@ -478,3 +483,4 @@ func handle_fall_movement(delta: float, direction: Vector2) -> Vector2: func handle_wallslide_movement(delta: float, direction: Vector2) -> Vector2: return calculate_wallslide_velocity(velocity, delta, direction) + diff --git a/src/Actors/Blobby/Blobby.tscn b/src/Actors/Blobby/Blobby.tscn index 25d5f1d..e4b3d44 100644 --- a/src/Actors/Blobby/Blobby.tscn +++ b/src/Actors/Blobby/Blobby.tscn @@ -4742,8 +4742,13 @@ one_shot = true wait_time = 1.618 one_shot = true +[node name="PitfallTimer" type="Timer" parent="."] +wait_time = 0.809 +one_shot = true + [connection signal="area_entered" from="BlobbySkin" to="." method="_on_BlobbySkin_area_entered"] [connection signal="body_entered" from="BlobbySkin" to="." method="_on_BlobbySkin_body_entered"] [connection signal="got_grounded" from="BlobbyStateMachine" to="." method="_on_Blobby_got_grounded"] [connection signal="timeout" from="BlobbyStateMachine/JumpBufferTimer" to="." method="_on_JumpBufferTimer_timeout"] [connection signal="timeout" from="InvincibilityTimer" to="." method="_on_InvincibilityTimer_timeout"] +[connection signal="timeout" from="PitfallTimer" to="." method="_on_PitfallTimer_timeout"] diff --git a/src/Actors/Enemies/Beings/Flyer.tscn b/src/Actors/Enemies/Beings/Flyer.tscn index 37a8b4d..a76272a 100644 --- a/src/Actors/Enemies/Beings/Flyer.tscn +++ b/src/Actors/Enemies/Beings/Flyer.tscn @@ -207,6 +207,7 @@ weight = 0.3 script = ExtResource( 2 ) [node name="StateLabel" type="Label" parent="."] +visible = false show_behind_parent = true margin_left = -36.0 margin_top = -30.0 diff --git a/src/Levels/Level 1.tscn b/src/Levels/Level 1.tscn index 2b30f75..c62b09d 100644 --- a/src/Levels/Level 1.tscn +++ b/src/Levels/Level 1.tscn @@ -36,10 +36,10 @@ unique_name_in_owner = true drag_margin_bottom = 0.3 [node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 11 +frame = 1 [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 11 +frame = 1 [node name="Blobby" parent="." instance=ExtResource( 8 )] unique_name_in_owner = true diff --git a/src/Levels/Level 2.tscn b/src/Levels/Level 2.tscn index 09eccb7..6f4de14 100644 --- a/src/Levels/Level 2.tscn +++ b/src/Levels/Level 2.tscn @@ -40,11 +40,8 @@ wait_time = 20.0 unique_name_in_owner = true drag_margin_bottom = 0.3 -[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 3 - [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 3 +frame = 7 [node name="Blobby" parent="." instance=ExtResource( 9 )] unique_name_in_owner = true diff --git a/src/Levels/Level 3.tscn b/src/Levels/Level 3.tscn index bb2aa99..a155b59 100644 --- a/src/Levels/Level 3.tscn +++ b/src/Levels/Level 3.tscn @@ -40,11 +40,8 @@ unique_name_in_owner = true drag_margin_top = 0.13 drag_margin_bottom = 0.3 -[node name="AnimatedSprite" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="4"] -frame = 2 - [node name="AnimatedSprite2" parent="BlobbyCam/ParallaxBackground/ParallaxLayer5" index="5"] -frame = 2 +frame = 7 [node name="Blobby" parent="." instance=ExtResource( 8 )] unique_name_in_owner = true