public void UnfreezeLevel() { paused = false; hole.Activate(); //timerManager.StopTimer(); safe.GetComponent <Rotator>().enabled = false; }
// Use this for initialization private void Start() { // add button functions // reset RealGlobals ResetRG.GetComponent <Button>().onClick.AddListener(() => { if (RealGlobalCooldown > 0) { LuaScriptBinder.ClearVariables(); RealGlobalCooldown = 60 * 2; ResetRG.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Real Globals Erased!" : "REEL GOLBELZ DELEET!!!!!"; } else { RealGlobalCooldown = 60 * 2; ResetRG.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Are you sure?" : "R U SUR???"; } }); // reset AlMightyGlobals ResetAG.GetComponent <Button>().onClick.AddListener(() => { if (AlMightyGlobalCooldown > 0) { LuaScriptBinder.ClearAlMighty(); AlMightyGlobalCooldown = 60 * 2; ResetAG.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "AlMighty Globals Erased!" : "ALMEIGHTIZ DELEET!!!!!"; } else { AlMightyGlobalCooldown = 60 * 2; ResetAG.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Are you sure?" : "R U SUR???"; } }); // clear Save ClearSave.GetComponent <Button>().onClick.AddListener(() => { if (SaveCooldown > 0) { File.Delete(Application.persistentDataPath + "/save.gd"); SaveCooldown = 60 * 2; ClearSave.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Save wiped!" : "RIP"; } else { SaveCooldown = 60 * 2; ClearSave.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Are you sure?" : "R U SUR???"; } }); // toggle safe mode Safe.GetComponent <Button>().onClick.AddListener(() => { ControlPanel.instance.Safe = !ControlPanel.instance.Safe; // save Safe Mode preferences to AlMighties LuaScriptBinder.SetAlMighty(null, "CYFSafeMode", DynValue.NewBoolean(ControlPanel.instance.Safe), true); Safe.GetComponentInChildren <Text>().text = !GlobalControls.crate ? ("Safe mode: " + (ControlPanel.instance.Safe ? "On" : "Off")) : ("SFAE MDOE: " + (ControlPanel.instance.Safe ? "ON" : "OFF")); }); Safe.GetComponentInChildren <Text>().text = !GlobalControls.crate ? ("Safe mode: " + (ControlPanel.instance.Safe ? "On" : "Off")) : ("SFAE MDOE: " + (ControlPanel.instance.Safe ? "ON" : "OFF")); // toggle retrocompatibility mode Retro.GetComponent <Button>().onClick.AddListener(() => { GlobalControls.retroMode = !GlobalControls.retroMode; // save RetroMode preferences to AlMighties LuaScriptBinder.SetAlMighty(null, "CYFRetroMode", DynValue.NewBoolean(GlobalControls.retroMode), true); Retro.GetComponentInChildren <Text>().text = !GlobalControls.crate ? ("Retrocompatibility Mode: " + (GlobalControls.retroMode ? "On" : "Off")) : ("RETORCMOAPTIILBIYT MOD: " + (GlobalControls.retroMode ? "ON" : "OFF")); }); Retro.GetComponentInChildren <Text>().text = !GlobalControls.crate ? ("Retrocompatibility Mode: " + (GlobalControls.retroMode ? "On" : "Off")) : ("RETORCMOAPTIILBIYT MOD: " + (GlobalControls.retroMode ? "ON" : "OFF")); // toggle pixel-perfect fullscreen Fullscreen.GetComponent <Button>().onClick.AddListener(() => { ScreenResolution.perfectFullscreen = !ScreenResolution.perfectFullscreen; // save RetroMode preferences to AlMighties LuaScriptBinder.SetAlMighty(null, "CYFPerfectFullscreen", DynValue.NewBoolean(ScreenResolution.perfectFullscreen), true); Fullscreen.GetComponentInChildren <Text>().text = !GlobalControls.crate ? ("Blurless Fullscreen: " + (ScreenResolution.perfectFullscreen ? "On" : "Off")) : ("NOT UGLEE FULLSCREEN: " + (ScreenResolution.perfectFullscreen ? "ON" : "OFF")); }); Fullscreen.GetComponentInChildren <Text>().text = !GlobalControls.crate ? ("Blurless Fullscreen: " + (ScreenResolution.perfectFullscreen ? "On" : "Off")) : ("NOT UGLEE FULLSCREEN: " + (ScreenResolution.perfectFullscreen ? "ON" : "OFF")); // change window scale Scale.GetComponent <Button>().onClick.AddListener(() => { double maxScale = System.Math.Floor(Screen.currentResolution.height / 480.0); if (ScreenResolution.windowScale < maxScale) { ScreenResolution.windowScale += 1; } else { ScreenResolution.windowScale = 1; } if (Screen.height != ScreenResolution.windowScale * 480 && !Screen.fullScreen) { ScreenResolution.SetFullScreen(false); } // save RetroMode preferences to AlMighties LuaScriptBinder.SetAlMighty(null, "CYFWindowScale", DynValue.NewNumber(ScreenResolution.windowScale), true); Scale.GetComponentInChildren <Text>().text = !GlobalControls.crate ? ("Window Scale: " + ScreenResolution.windowScale.ToString() + "x") : ("WEENDO STRECH: " + ScreenResolution.windowScale.ToString() + "X"); }); ScreenResolution.windowScale--; Scale.GetComponent <Button>().onClick.Invoke(); // Discord Rich Presence // Change Discord Status Visibility Discord.GetComponent <Button>().onClick.AddListener(() => { Discord.GetComponentInChildren <Text>().text = (!GlobalControls.crate ? "Discord Display: " : "DEESCORD DESPLAY: ") + DiscordControls.ChangeVisibilitySetting(1); }); Discord.GetComponentInChildren <Text>().text = (!GlobalControls.crate ? "Discord Display: " : "DEESCORD DESPLAY: ") + DiscordControls.ChangeVisibilitySetting(0); // exit Exit.GetComponent <Button>().onClick.AddListener(() => { SceneManager.LoadScene("ModSelect"); }); // Crate Your Frisk if (!GlobalControls.crate) { return; } // labels GameObject.Find("OptionsLabel").GetComponent <Text>().text = "OPSHUNS"; GameObject.Find("DescriptionLabel").GetComponent <Text>().text = "MORE TXET"; // buttons ResetRG.GetComponentInChildren <Text>().text = "RESTE RELA GOLBALZ"; ResetAG.GetComponentInChildren <Text>().text = "RESTE ALMIGTY GOLBALZ"; ClearSave.GetComponentInChildren <Text>().text = "WYPE SAV"; Exit.GetComponentInChildren <Text>().text = "EXIT TOO MAD SELCT"; }