fix: Pitfall death no animations
This commit is contained in:
parent
1533e94fa2
commit
c2cea0a0e3
@ -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)
|
||||
|
||||
|
||||
@ -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"]
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user