using UnityEngine; public class DebugController : MonoBehaviour { public enum SaveLoadMode { Normal, LoadEmptySaveFileOnStartup, LoadMaxedOutSaveFileOnStartup } [Tooltip("Set to -1 to disable")] public int startGameInWave = -1; public static DebugController instance; [SerializeField] private SaveLoadMode saveLoadMode; [SerializeField] private bool saveTheGame = true; public KeyCode addCoin = KeyCode.Alpha2; public KeyCode removeCoin = KeyCode.Alpha3; public KeyCode getPoints = KeyCode.Alpha4; public KeyCode upgradeAllBuildingsToMax = KeyCode.Alpha9; public KeyCode reviveAllYourUnits = KeyCode.Alpha6; public KeyCode killAllEnemyUnits = KeyCode.Alpha7; public KeyCode restartScene = KeyCode.R; public KeyCode spawnNextWave = KeyCode.T; public KeyCode goToLevelSelect = KeyCode.Escape; public KeyCode instaWinLevel = KeyCode.End; public KeyCode causeLagSpike = KeyCode.L; public KeyCode openTestChoice = KeyCode.C; public KeyCode softWinLevel = KeyCode.Alpha8; public KeyCode deletePlayerPrefs = KeyCode.Minus; public KeyCode killPlayer = KeyCode.K; public KeyCode enableDisableUI = KeyCode.KeypadMinus; private PlayerInteraction playerInteraction; private float muteClock; private bool muted; private float initMasterVol; public int StartGameInWave => -1; public static SaveLoadMode SaveLoadModeToUse { get { if (instance == null) { return SaveLoadMode.Normal; } _ = instance.enabled; return SaveLoadMode.Normal; } } public static bool SaveTheGame { get { if (instance == null) { return true; } _ = instance.enabled; return true; } } private void Awake() { if (instance != null) { Object.Destroy(base.gameObject); return; } instance = this; Object.DontDestroyOnLoad(base.gameObject); } public void EnableUICanvases() { NightCall.instance.gameObject.SetActive(value: true); UIFrameManager.instance.gameObject.SetActive(value: true); } private void Update() { } public void LogChoice(Choice _choice) { if (_choice != null) { Debug.Log(_choice.name); } else { Debug.Log("Choice cancelled."); } } public void Mute(float duration = 3f) { ThronefallAudioManager.Mute(); muted = true; if (duration > muteClock) { muteClock = duration; } } }