private void OnMainMenuButtonPressed() { if (LeaderBoardService.CanAdd(GlobalState.State.Scores)) { LeaderBoardService.UpdateLeaders(_playerName.Text, GlobalState.State.Scores); } GetTree().ChangeScene("res://ui/MainScreen.tscn"); }
private void OnRestartButtonPressed() { if (LeaderBoardService.CanAdd(GlobalState.State.Scores)) { LeaderBoardService.UpdateLeaders(_playerName.Text, GlobalState.State.Scores); } GetTree().ChangeScene("res://objects/World/World.tscn"); }