void PopulateCheatsDialog() { CheatsDialog dialog = Game.instance.hud.cheatsDialog; dialog.AddButton("Close", CloseCheatDialog, ""); dialog.AddButton("Unlock Dungeons", UnlockAllDungeons, ""); dialog.AddButton("Reveal Map", RevealMap, ""); dialog.AddButton("Dungeon Exit", TeleportToDungeonExit, ""); dialog.AddButton("Add Coins", AddCoins, ""); dialog.AddButton("Add Hearts", AddHearts, ""); dialog.AddButton("Kill Avatar", KillAvatar, ""); dialog.AddButton("Skip to Boss", SkipToBoss, ""); dialog.AddButton("No Damage", NoDamage, ""); dialog.AddButton("Debug Dungeon", EnterDebugDungeon, ""); dialog.AddButton("Companions", BuildFullCompanionSet, ""); dialog.AddButton("Reset Game", ResetGame, ""); dialog.AddButton("Unlock NPCS", UnlockAllNPCS, ""); dialog.AddButton("Test Item", TestSpecificItem, ""); dialog.AddButton("Save Backup", CreateTestingBackup, ""); dialog.AddButton("Load Backup", LoadTestingBackup, ""); dialog.AddButton("Kill Enemies", KillEnemies, ""); }
// Update is called once per frame void Update() { // Cheat that works even in builds to clear out save data // todo bdsowers - provide a first-class route for this if (Input.GetKey(KeyCode.A) && Input.GetKey(KeyCode.P) && Input.GetKey(KeyCode.M) && Input.GetKey(KeyCode.Escape)) { ResetGame(); } #if DISABLE_CHEATS return; #endif if (Input.GetKeyDown(KeyCode.C)) { CheatsDialog dialog = Game.instance.hud.cheatsDialog; if (!dialog.hasBeenPopulated) { dialog.hasBeenPopulated = true; PopulateCheatsDialog(); } Game.instance.hud.cheatsDialog.gameObject.SetActive(true); } if (Input.GetKeyDown(KeyCode.S)) { TakeScreenshot(); } #if PROMO_BUILD if (Input.GetKeyDown(KeyCode.R)) { Camera.main.enabled = false; } #endif }