using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; public class ResultSceneManager : MonoBehaviour { private LeaderboardController leaderboardController; public UnityEvent OnDailyTop; public UnityEvent OnGlobalTop; public UnityEvent OnNoTop; private void Start() { leaderboardController = FindObjectOfType(); leaderboardController.RefreshEntries(); leaderboardController.SaveData(); if (!leaderboardController.CheckCurrentPlayerDailyTop() && !leaderboardController.CheckCurrentPlayerGlobalTop()) { OnNoTop?.Invoke(); } } public void CheckDailyTop() { if (leaderboardController.CheckCurrentPlayerDailyTop()) { OnDailyTop?.Invoke(leaderboardController.GetCurrentPlayerDailyPos()); Debug.Log("Вы попали в Топ 30 игроков дня!"); } } public void CheckGlobalTop() { if (leaderboardController.CheckCurrentPlayerGlobalTop()) { OnGlobalTop?.Invoke(leaderboardController.GetCurrentPlayerGlobalPos()); Debug.Log("Вы попали в Топ 30 игроков за всё время!"); } } }