summaryrefslogtreecommitdiff
path: root/Thronefall_v1.0/Decompile/DebugController.cs
blob: 878e6d7ba01212a6b8e4142c21a2192efbd75489 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
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;
		}
	}
}