Skip to content

Commit 72d238e

Browse files
committed
Speed up HTTP
Slightly sped up HTTP by combining two requests into one.
1 parent 1cf3ce7 commit 72d238e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

project/assets/scripts/main.gd

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,9 @@ func _on_signin_authenticated() -> void:
261261
Global.skins = Global.skins.split(",")
262262
else:
263263
Global.skins = []
264-
Global.coins = int(await Global.get_user_info(Global.user, "coins"))
265-
Global.high_score = int(await Global.get_user_info(Global.user, "high_score"))
264+
var resp = await Global.get_user_info(Global.user)
265+
Global.coins = int(resp[Global.columns.find("coins")])
266+
Global.high_score = int(resp[Global.columns.find("high_score")])
266267
$Start/Coins.text = str(Global.coins) + " Coins"
267268
$Start/Username.text = Global.user
268269
$High_Score.text = str(Global.high_score)

0 commit comments

Comments
 (0)