Work on exports and some fixes to sound and multiplayer functions

This commit is contained in:
2026-01-09 06:53:37 -05:00
parent ec02685065
commit d5ff05ae75
11 changed files with 156 additions and 11 deletions

View File

@@ -49,14 +49,17 @@ func start_level(pawns : Dictionary[int, PawnBaseData]) -> void:
level_synced[1] = true
switch_scene(vs_man_level)
func switch_scene(packed_scene : PackedScene) -> void:
func switch_scene(packed_scene : PackedScene, spawn : bool = true) -> void:
var blinder = blinder_template.instantiate() as TextureRect
var tween = create_tween()
blinder.self_modulate.a = 0
add_child(blinder)
tween.tween_property(blinder, "self_modulate:a", 1, .15)
var spawner = get_tree().get_first_node_in_group("level_spawner") as MultiplayerSpawner
tween.tween_callback(spawner.add_child.bind(packed_scene.instantiate(),true))
if spawn:
var spawner = get_tree().get_first_node_in_group("level_spawner") as MultiplayerSpawner
tween.tween_callback(spawner.add_child.bind(packed_scene.instantiate(),true))
else:
tween.tween_callback(get_tree().change_scene_to_packed.bind(packed_scene))
tween.tween_property(blinder, "self_modulate:a", 0, .15)
tween.tween_callback(blinder.queue_free)