diff --git a/autoloads/scene_manager.gd b/autoloads/scene_manager.gd index 6258ad2..cf1411a 100644 --- a/autoloads/scene_manager.gd +++ b/autoloads/scene_manager.gd @@ -39,12 +39,12 @@ var current_scene: Node: return # remove current scene if current_scene: - viewport.remove_child(current_scene) + viewport.remove_child.call_deferred(current_scene) current_scene.queue_free() # add new scene if new_scene.is_inside_tree(): - new_scene.get_parent().remove_child(new_scene) - viewport.add_child(new_scene) + new_scene.get_parent().remove_child.call_deferred(new_scene) + viewport.add_child.call_deferred(new_scene) current_scene = new_scene diff --git a/objects/player/player.tscn b/objects/player/player.tscn index 7e60ec2..cc7aa23 100644 --- a/objects/player/player.tscn +++ b/objects/player/player.tscn @@ -364,7 +364,7 @@ script = ExtResource("10_mvu25") script = ExtResource("7_rgjdc") to = NodePath("..") event = &"jump_pressed" -delay_in_seconds = "" +delay_in_seconds = "0.0" [node name="on TimeOut" type="Node" parent="StateChart/Root/Floating/Splat"] script = ExtResource("7_rgjdc") @@ -378,7 +378,7 @@ script = ExtResource("10_mvu25") [node name="on TimeOut" type="Node" parent="StateChart/Root/Floating/UnSplat"] script = ExtResource("7_rgjdc") to = NodePath("../../../Airborne/Falling") -delay_in_seconds = ".25" +delay_in_seconds = "0.25" [connection signal="taken" from="StateChart/Root/on Killed" to="." method="_reset_position"] [connection signal="taken" from="StateChart/Root/on Killed" to="Sounds/Death" method="play"] @@ -400,8 +400,8 @@ delay_in_seconds = ".25" [connection signal="state_entered" from="StateChart/Root/Airborne/Missile" to="Sounds/Whee" method="play"] [connection signal="state_entered" from="StateChart/Root/Airborne/Missile" to="Sounds/Wallkick" method="play"] [connection signal="state_exited" from="StateChart/Root/Airborne/Missile" to="." method="_restore_graphics_rotation"] -[connection signal="state_physics_processing" from="StateChart/Root/Airborne/Missile" to="." method="_face_towards_velocity"] [connection signal="state_physics_processing" from="StateChart/Root/Airborne/Missile" to="." method="_check_for_splat"] +[connection signal="state_physics_processing" from="StateChart/Root/Airborne/Missile" to="." method="_face_towards_velocity"] [connection signal="taken" from="StateChart/Root/Airborne/Missile/on Splatted" to="Sounds/HitWall" method="play"] [connection signal="state_entered" from="StateChart/Root/Floating/Splat" to="Graphics/Sprite/Splat" method="play"] [connection signal="taken" from="StateChart/Root/Floating/Splat/on JumpPressed" to="." method="_do_splat_launch"]