Kizspy | Question: 23
(Choose 1 answer)
What does the 'EndGame' method do?
using UnityEngine;
public class GameManager: MonoBehaviour {
public static GameManager Instance { get; private set; }
public bool isGameOver;
void Awake() {
if (Instance
null) {
Instance this;
DontDestroy OnLoad(gameObject);
} else {
Destroy(gameObject);
}
public void EndGame() {
isGameOver = true;
Time.timeScale = Of;
}
A. Restores the game to its initial state
B. Pauses the game by setting time scale to 0
C. Terminates the current game instance immediately
D. Activates a new game instance on execution