Files
fps_project_1/scripts/playlist_loader.gd

26 lines
735 B
GDScript

extends Node
@onready var playlist_generator: Control = $"../Playlist Generator"
var portals = []
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
playlist_generator.load_playlist()
print("CURRENT MATCH : ",GameGlobals.current_match)
for i in get_tree().current_scene.get_children():
if i.is_in_group("portal"):
portals.append(i)
print("PORTALS")
var id = 0
for i in portals:
i.scene_path = str(GameGlobals.current_match[0][id]["map"])
i.scene_name = str(GameGlobals.current_match[0][id]["map"])
id += 1
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
print("CURRENT MATCH ",GameGlobals.current_match[0])