Work on exports and some fixes to sound and multiplayer functions
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user