From 0f3c49b7743f7c7fabf41fdf4cb3ffe1a4ac3bf4 Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 10 Nov 2025 12:56:00 -0300 Subject: Placar. --- scripts/GameManager.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scripts/GameManager.cs') diff --git a/scripts/GameManager.cs b/scripts/GameManager.cs index df93954..4215475 100644 --- a/scripts/GameManager.cs +++ b/scripts/GameManager.cs @@ -10,6 +10,7 @@ public partial class GameManager : Node private PackedScene mainMenuScene = GD.Load("res://scenes/GUI/main_menu.tscn"); private PackedScene gameScene = GD.Load("res://scenes/Game.tscn"); private PackedScene nameScene = GD.Load("res://scenes/name_thyself.tscn"); + private PackedScene leaderboardScene = GD.Load("res://scenes/GUI/Leaderboard.tscn"); private Node currentScene; @@ -44,6 +45,7 @@ public partial class GameManager : Node MainMenu menu = (MainMenu)SwitchToScene(mainMenuScene); Stats.Instance.Clear(); menu.GameRequest += OnGameRequest; + menu.LeaderboardRequest += OnLeaderboardRequest; } private void LoadGame() @@ -88,4 +90,10 @@ public partial class GameManager : Node LoadGame(); } } + + private void OnLeaderboardRequest() + { + Leaderboard scene = (Leaderboard)SwitchToScene(leaderboardScene); + scene.MenuRequested += LoadMainMenu; + } } -- cgit v1.2.3