summaryrefslogtreecommitdiff
path: root/Thronefall_v1.57/Thronefall/Thronefall/DebugController.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Thronefall_v1.57/Thronefall/Thronefall/DebugController.cs')
-rw-r--r--Thronefall_v1.57/Thronefall/Thronefall/DebugController.cs138
1 files changed, 138 insertions, 0 deletions
diff --git a/Thronefall_v1.57/Thronefall/Thronefall/DebugController.cs b/Thronefall_v1.57/Thronefall/Thronefall/DebugController.cs
new file mode 100644
index 0000000..ee6c012
--- /dev/null
+++ b/Thronefall_v1.57/Thronefall/Thronefall/DebugController.cs
@@ -0,0 +1,138 @@
+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;
+
+ public TextAsset emptySaveFile;
+
+ public TextAsset maxedSaveFile;
+
+ 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 loseLevel = KeyCode.Q;
+
+ public KeyCode deletePlayerPrefs = KeyCode.Minus;
+
+ public KeyCode killPlayer = KeyCode.K;
+
+ public KeyCode enableDisableUI = KeyCode.KeypadMinus;
+
+ public KeyCode printNextWaveInfo = KeyCode.N;
+
+ 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;
+ }
+ }
+}