Implemented getting and setting high scores from server

This commit is contained in:
Max 2025-03-07 09:26:54 +01:00
parent c103ffb339
commit d3e2d425bf
17 changed files with 346 additions and 17 deletions

View file

@ -1,11 +1,15 @@
using System;
using System.Collections;
using DungeonSelection;
using Scores;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LeaveDungeonHandler : MonoBehaviour
{
[SerializeField] private DungeonData dungeonData;
[SerializeField] private ScoreManager scoreManager;
private void OnEnable()
{
EndGameController.LeaveDungeonClicked += LeaveDungeon;
@ -20,7 +24,7 @@ public class LeaveDungeonHandler : MonoBehaviour
private void SaveScore(string name, int score)
{
Debug.Log($"{name} | {score}");
scoreManager.PostScore(name, dungeonData.Id, score);
}
private void LeaveDungeon()