Implemented getting and setting high scores from server
This commit is contained in:
parent
c103ffb339
commit
d3e2d425bf
17 changed files with 346 additions and 17 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue