diff options
| author | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-11-10 12:56:00 -0300 |
|---|---|---|
| committer | Matheus <matheus.guedes.mg.m@gmail.com> | 2025-11-10 12:56:00 -0300 |
| commit | 0f3c49b7743f7c7fabf41fdf4cb3ffe1a4ac3bf4 (patch) | |
| tree | df940efb7502899441295acd5039311b9e6e4927 /scripts/GameManager.cs | |
| parent | c4f5404211ef654944d5615e9055c714441f8234 (diff) | |
Placar.
Diffstat (limited to 'scripts/GameManager.cs')
| -rw-r--r-- | scripts/GameManager.cs | 8 |
1 files changed, 8 insertions, 0 deletions
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<PackedScene>("res://scenes/GUI/main_menu.tscn"); private PackedScene gameScene = GD.Load<PackedScene>("res://scenes/Game.tscn"); private PackedScene nameScene = GD.Load<PackedScene>("res://scenes/name_thyself.tscn"); + private PackedScene leaderboardScene = GD.Load<PackedScene>("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; + } } |
