Add score to FortFight, clean up the resets
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Core;
|
||||
using System;
|
||||
using Core;
|
||||
using Core.Lifecycle;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
@@ -220,12 +221,10 @@ namespace Minigames.FortFight.UI
|
||||
/// <summary>
|
||||
/// Restart the game by reloading the current scene
|
||||
/// </summary>
|
||||
private void RestartGame()
|
||||
private async void RestartGame()
|
||||
{
|
||||
// Use Unity's SceneManager to reload current scene
|
||||
string currentScene = UnityEngine.SceneManagement.SceneManager.GetActiveScene().name;
|
||||
Logging.Debug($"[GameOverUI] Reloading scene: {currentScene}");
|
||||
UnityEngine.SceneManagement.SceneManager.LoadScene(currentScene);
|
||||
var progress = new Progress<float>(p => Logging.Debug($"Loading progress: {p * 100:F0}%"));
|
||||
await SceneManagerService.Instance.ReloadCurrentScene(progress);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user