added leaderboard drop down menu and started on leaderboard test
This commit is contained in:
@@ -24,7 +24,7 @@ func _process(delta: float) -> void:
|
||||
|
||||
|
||||
func generate_playlist() -> void:
|
||||
var playlist_name = only_valid_chars(GameGlobals.leaderboard_name)
|
||||
var playlist_name = only_valid_chars(GameGlobals.all_user_leaderboards[GameGlobals.user_id][GameGlobals.last_leaderboard_id])
|
||||
var playlist = []
|
||||
print("PLAYLIST CREATED FOR THE : ",playlist_name)
|
||||
for i in rounds:
|
||||
@@ -55,15 +55,15 @@ func only_valid_chars(input_string: String) -> String:
|
||||
return valid_chars
|
||||
|
||||
func save_playlist(playlist):
|
||||
var playlist_name = str(only_valid_chars(GameGlobals.leaderboard_name))
|
||||
var playlist_name = str(only_valid_chars(GameGlobals.all_user_leaderboards[GameGlobals.user_id][GameGlobals.last_leaderboard_id]))
|
||||
var playlist_path : String = "user://"+ playlist_name + "_playlist.save"
|
||||
var file = FileAccess.open(playlist_path, FileAccess.WRITE)
|
||||
file.store_var(only_valid_chars(GameGlobals.leaderboard_name))
|
||||
file.store_var(only_valid_chars(GameGlobals.all_user_leaderboards[GameGlobals.user_id][GameGlobals.last_leaderboard_id]))
|
||||
file.store_var(playlist)
|
||||
file.close()
|
||||
|
||||
func load_playlist():
|
||||
var playlist_path : String = "user://" + str(only_valid_chars(GameGlobals.leaderboard_name)) + "_playlist.save"
|
||||
var playlist_path : String = "user://" + str(only_valid_chars(GameGlobals.all_user_leaderboards[GameGlobals.user_id][GameGlobals.last_leaderboard_id])) + "_playlist.save"
|
||||
if FileAccess.file_exists(playlist_path):
|
||||
var file = FileAccess.open(playlist_path, FileAccess.READ)
|
||||
var key = file.get_var()
|
||||
|
||||
Reference in New Issue
Block a user