More work on maps and multiplayer
This commit is contained in:
@@ -57,7 +57,11 @@ func switch_scene(packed_scene : PackedScene, spawn : bool = true) -> void:
|
||||
tween.tween_property(blinder, "self_modulate:a", 1, .15)
|
||||
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))
|
||||
tween.tween_callback(spawner.add_child.bind(packed_scene.instantiate(), true))
|
||||
var current_scene = get_tree().get_first_node_in_group("scenes")
|
||||
if current_scene:
|
||||
tween.tween_callback(current_scene.queue_free)
|
||||
current_scene.process_mode=Node.PROCESS_MODE_DISABLED
|
||||
else:
|
||||
tween.tween_callback(get_tree().change_scene_to_packed.bind(packed_scene))
|
||||
tween.tween_property(blinder, "self_modulate:a", 0, .15)
|
||||
|
||||
Reference in New Issue
Block a user