update map gen

This commit is contained in:
2026-06-09 22:46:32 +07:00
parent 9048435ac4
commit 1c8544d383
28 changed files with 834 additions and 442 deletions

View File

@@ -18,18 +18,20 @@ public class GameManager : NetworkBehaviour
}
}
public void TriggerGameOver() {
[SerializeField] private Hallucinate.Network.MatchEloManager eloManager;
public void TriggerGameOver(PlayerRef winner, PlayerRef loser, bool isDraw = false) {
if (!isGameOver) {
// Mark the game as over
isGameOver = true;
if (gameOverText != null) {
// Display the Game Over text
gameOverText.gameObject.SetActive(true);
}
// Freeze the game by setting the time scale to 0
Time.timeScale = 0;
// Only Host processes Elo
if (Runner.IsServer && eloManager != null) {
eloManager.ProcessMatchResult(winner, loser, isDraw);
}
}
}
}
}