can now add and store leaderboards. started work on playlist loading
This commit is contained in:
25
scripts/playlist_loader.gd
Normal file
25
scripts/playlist_loader.gd
Normal file
@@ -0,0 +1,25 @@
|
||||
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])
|
||||
Reference in New Issue
Block a user